FLUTTER ECOSYSTEM

MattiaPispisa/posix_tz

Posix タイムゾーンの Dart パッケージ。このライブラリは、標準的な Posix 形式のタイムゾーンを提供します。データは /usr/share/zoneinfo の内容を読み取ることで取得されます。

posix_tz のプロジェクト画像
Stars
1
Forks
0
最終プッシュ(UTC)
2024/04/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"));