パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0

abushakir

エチオピア暦システム(ባሕረ ሃሳብ)用のDart/Flutterパッケージです。エチオピアの日付・時刻、カレンダー、および関連する祝日との移動可能な断食を統合するのに役立ちます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
390
いいね数
51
Pub ポイント
130

パッケージをインストール

flutter pub add abushakir

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

エチオピア暦システム(ባሕረ ሃሳብ)を実装するFlutter/Dartパッケージで、開発者がエチオピアの日付、時刻、移動する断食および関連する祝日と連携できるようにします。グレゴリオ暦とエチオピア暦間の正確な変換をサポートしており、エチオピアユーザー向けアプリケーションや宗教的・文化的な日付計算が必要なアプリケーションに最適です。このパッケージはすべての主要プラットフォームと互換性があり、Flutterプロジェクトにスムーズに統合できます。

用途

  • 宗教アプリへのエチオピア暦の統合
  • エチオピアの祝日と断食を支援する
  • エチオピア暦とグレゴリオ暦の相互変換
  • 文化的に関連するスケジューリングツールの構築
  • エチオピアの歴史向け教育アプリの開発
  • エチオピア向けのローカルイベントカレンダーの作成

主な機能

  • 完全なエチオピア暦のサポート
  • 移動可能な断食および休日計算
  • グレゴリオ暦-エチオピア暦の日付変換
  • クロスプラットフォーム互換性
  • シンプルな API インテグレーション
  • 正確な宗教的日付論理

適している対象

  • エチオピアのユーザーをターゲットにしたアプリ
  • 宗教的または文化的アプリケーション
  • 教育ソフトウェア
  • 日付ベースのイベント計画
  • エチオピア暦機能を必要とする開発者

注意事項

  • エチオピア暦のルールを理解する必要があります
  • エチオピア固有の日付ロジックに限定
  • 完全なユーザー体験を得るには、追加のローカリゼーションが必要になる場合があります
  • 正確な入力に依存して正確な結果を得る
  • 一般的な国際日付処理には適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Abushakir (ባሕረ ሃሳብ)

GitHub stars GitHub forks GitHub license

The words Bahire Hasab originate from the ancient language of Ge'ez, ( Arabic: Abu Shakir) is a time-tracking method, devised by the 12th pope of Alexandria, Pope St. Dimitri.

What does it mean?

"Bahire Hasab /'bəhrɛ həsəb'/ " simply means "An age with a descriptive and chronological number". In some books it can also be found as "Hasabe Bahir", in a sense giving time an analogy, resembling a sea.

This package allows developers to implement Ethiopian Calendar and Datetime System in their application(s)`.

This package is implemented using the UNIX EPOCH which means it's not a conversion of any other calendar system into Ethiopian, for instance, Gregorian Calendar.

Unix Epoch is measured using milliseconds since 01 Jan, 1970 UTC. In unix epoch leap seconds are ignored.

Documentation

Abushakir

Demo

Ethiopian calendar

Prerequisites

Before you begin, ensure you have met the following requirements:

  • equatable= ^2.0.5

Getting started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  abushakir: "^1.0.0"

In your library add the following import:

import 'package:abushakir/abushakir.dart';

Example

   /**
   * Ethiopian Datetime Module [EtDatetime]
   */
  EtDatetime now = new EtDatetime.now(); // => 2012-07-28 17:18:31.466
  print(now.date); // => {year: 2012, month: 7, day: 28}
  print(now.time); // => {h: 17, m: 18, s: 31}

  EtDatetime covidFirstConfirmed = new EtDatetime(year: 2012, month: 7, day: 4);
  EtDatetime covidFirstConfirmedEpoch =
      new EtDatetime.fromMillisecondsSinceEpoch(covidFirstConfirmed.moment);

  EtDatetime covidFirstDeath = EtDatetime.parse("2012-07-26 23:00:00");

  /// Comparison of two EtDatetime Instances
  Duration daysWithOutDeath = covidFirstConfirmed.difference(covidFirstDeath);

  assert(daysWithOutDeath.inDays == -22, true); // 22 days

  assert(covidFirstDeath.isAfter(covidFirstConfirmed), true);

  assert(covidFirstDeath.isBefore(now), true);

  assert(covidFirstConfirmed.isAtSameMomentAs(covidFirstConfirmedEpoch), true);

  /**
   * Ethiopian Calendar Module [ETC]
   */
  ETC ethiopianCalendar = new ETC(year: 2012, month: 7, day: 4);

  ///
  print(ethiopianCalendar.monthDays(geezDay: true, weekDayName:true)); // Iterable Object of the given month
  print(ethiopianCalendar.monthDays().toList()[0]); // => [2012, 7, ፩, አርብ]
  // [year, month, dateNumber, dateNameIndex], Monday as First weekday

  print(ethiopianCalendar.nextMonth); // => ETC instance of nextMonth, same year
  print(ethiopianCalendar.prevYear); // => ETC instance of prevYear, same month

  /**
   * Bahire Hasab Module [BahireHasab]
   */
  BahireHasab bh = BahireHasab(year: 2011);
//  BahireHasab bh = BahireHasab(); // Get's the current year

  print(bh.getEvangelist(returnName: true)); // => ሉቃስ

  print(bh.getSingleBealOrTsom("ትንሳኤ")); // {month: ሚያዝያ, date: 20}

  bh.allAtswamat; // => List of All fasting and Movable holidays

  /**
   * Arabic or English number (1,2,3...) to Ethiopic or GE'EZ (፩, ፪, ፫...) number Converter
   */

  var input= [1, 10, 15, 20, 25, 78, 105, 333, 450, 600, 1000, 1001, 1010, 1056, 1200, 2013, 9999, 10000];

  for (var arabic in input) {
     print(ConvertToEthiopic(arabic)); // [፩, ፲, ፲፭, ፳, ፳፭, ፸፰, ፻፭, ፫፻፴፫, ፬፻፶, ፮፻, ፲፻, ፲፻፩, ፲፻፲, ፲፻፶፮, ፲፪፻, ፳፻፲፫, ፺፱፻፺፱, ፻፻]
  }

   /*
   * Conversion from any calendar (in this case, Gregorian) into Ethiopian Calendar.
   */
    DateTime gregorian1 = new DateTime.now();
    EtDatetime ethiopian1 = new EtDatetime.fromMillisecondsSinceEpoch(gregorian1.millisecondsSinceEpoch);

    print("Gregorian := ${gregorian1.toString()} is equivalent to Ethiopian ${ethiopian1.toString()}");
    // Gregorian := 2020-09-22 23:36:37.042962 is equivalent to Ethiopian 2013-01-12 20:36:37.042
    /*
    * Conversion from Ethiopian Calendar into any calendar (in this case, Gregorian).
    */
    EtDatetime ethiopian = new EtDatetime.now();
    DateTime gregorian = new DateTime.fromMillisecondsSinceEpoch(ethiopian.moment);

    print("Ethiopian ${ethiopian.toString()} is equivalent to Gregorian := ${gregorian.toString()}");
    // Ethiopian 2013-01-12 20:36:37.044 is equivalent to Gregorian := 2020-09-22 23:36:37.044

    print("Ethiopian EPOCH := ${ethiopian.moment}"); // Ethiopian EPOCH := 1600806997044
    print("Gregorian EPOCH := ${gregorian.millisecondsSinceEpoch}"); // Gregorian EPOCH := 1600806997044

For further implementation example see this flutter application

Contributors

Thanks to the following people who have contributed to this project:

Contact

If you want to contact me you can reach me at <nabute925@gmail.com>.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。