搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.0

abushakir

一個用於埃塞俄比亞日曆系統(ባሕረ ሃሳብ)的 Dart/Flutter 套件。它可以幫助您整合埃塞俄比亞日期時間、日曆以及所有與相應節日相關的移動齋戒。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
390
喜歡數
51
Pub 分數
130

安裝套件

flutter pub add abushakir

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter/Dart 套件,實現了衣索比亞曆法系統(ባሕረ ሃሳብ),讓開發者能夠處理衣索比亞日期、時間、移動的禁食以及相關節日。它支援格里高利曆與衣索比亞曆之間的精確轉換,非常適合服務衣索比亞用戶或需要宗教與文化日期計算的應用程式。此套件可在所有主要平台相容,並能順暢整合至 Flutter 專案中。

適用情境

  • 在宗教類應用程式中整合埃塞俄比亞曆法
  • 支援埃塞俄比亞的節日和齋戒
  • 埃塞俄比亞日曆與格里高利日曆之間的轉換
  • 建構具有文化相關性的排程工具
  • 開發埃塞俄比亞歷史教育應用
  • 為埃塞俄比亞創建本地活動日曆

主要特色

  • 完整的埃塞俄比亞日曆支援
  • 可移動的禁食與假日計算
  • 格里高利-衣索比亞日期轉換
  • 跨平台相容性
  • 簡單的 API 結合
  • 精確的宗教日期邏輯

適合對象

  • 面向埃塞俄比亞用戶的App
  • 宗教或文化應用
  • 教育軟體
  • 基於日期的活動規劃
  • 需要埃塞俄比亞日曆功能的開發人員

使用建議

  • 需要了解埃塞俄比亞日曆規則
  • 僅限埃塞俄比亞特定的日期邏輯
  • 可能需要額外的本地化才能獲得完整的用戶體驗
  • 依賴於正確輸入以獲得準確結果
  • 不適用於一般國際日期處理

原始 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。