FLUTTER ECOSYSTEM

MattiaPispisa/posix_tz

Posix 시간대 dart 패키지. 이 라이브러리는 표준 Posix 형식의 시간대를 제공합니다. 데이터는 /usr/share/zoneinfo의 내용을 읽어와 얻습니다.

posix_tz 프로젝트 이미지
Stars
1
Forks
0
최근 푸시(UTC)
2024. 4. 21.
프로젝트 상태
활성
Mattia GitHub avatar
GITHUB User

Mattia ↗

I have always been passionate about mobile development. I started with iOS and then transitioned to a hybrid approach.

MVLabsUdine, Italy공식 웹사이트 ↗
언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Posix Tz

This library provides timezones in the standard Posix format. The data is obtained by reading the content of /usr/share/zoneinfo.

Initialization

It's important to initialize the library before reading the timezones.

void main() {
    await initializePosixTz();
}

Usage

// after initialization
final posixTz = db.get("Europe/Rome");
print(posixTz.toString()) // name:Europe/Rome, posix:CET-1CEST,M3.5.0,M10.5.0/3

Other

PosixTz can be compared.

final posixTz1 = posixTzDb.get('Europe/Rome');
final posixTz2 = posixTzDb.get('Europe/Rome');
final posixTz3 = posixTzDb.get('Atlantic/Stanley');
print(posixTz1 == posixTz2); // true
print(posixTz1 == posixTz3); // false

posixTzDb can be expanded.

posixTzDb.add(PosixTz(name: "Ababwa",posix: "<+06>-6"));