MMDate(Myanmar Date Time)

MMDate Library အသုံးပြုနည်း

Posted by Ko Htut on May 8, 2020

Algorithm, Program and Calculation of Myanmar Date

MMDate အား Flutter တွင် မြန်မာရက်များအား အလွယ်တကူ တွက်ချက်နိင်ရန် ၊ ဖော်ပြနိင်ရန် အတွက် ရည်ရွယ်ရေးသားထားပါဘည် ။ MMDate (library) သည် မြန်မာ့ပြက္ခဒိန်ရက်များကို အလွယ်ကူဆုံးတွက်ပီးပြပေးမှာဖြစ်ပီး ၊ သင်္ကြန်တက်ချိန်၊ သင်္ကြန်ကျချိန်၊ အကျနေ့၊ အတက်နေ့ များကိုသာမက ကမ္ဘာသုံး JDN ရက် များနှင့်လည်း သွေဖယ်မှုမရှိအောင် တွက်ချက်ပြသပေးပါသည် ၊ မြန်မာ့စံတော်ချ်ိန် မြန်မာစံတော်ချိန် (Myanmar Standard Time UTC+06:30 ) ပေါ်မှာ အခြေခံထားပြီး အဲဒါက လောင်ဂျီကျု ၉၇° ၃၀’ ပေါ်မှာ အခြေခံပါထားပါသည် ။

တွက်ချက်မှု အားလုံးသည် javascript program MMCAL ကို တိုက်ရိုက်သော်လည်ကောင်း သွယ်ဝိုက်၍သော်လည်းကောင်း အသုံးပြထားပါသည် ။ တွက်ချက်မှုအားလုံး သို့မဟုတ် အသေးစိတ်အကြောင်းအရာကို မှုလရေးသားထားသော Post algorithm-program-and-calculation တွင်ကြည့်ရူ့နိင်ပါသည် ။

Pub Version (including pre-releases)

Created from templates made available by Stagehand under a BSD-style license.

အသုံးပြုနည်း

pubspec.yaml file တွင် MMDate အားဦးစွာထည့်သွင်းပေး ရပါမည် ။

dependencies:
  mmdate: (version)

အသုံးပြု:ရန်ပြင်ဆင်ခြင်း ..

import 'package:mmdate/mmdate.dart';

main() {
  MMDate mmdate = new MMDate();
}

get MM-date

Sting mmdate = mmdate.now();
//  နမှုနာ "  ၁၃၈၁ : ပြာသို : လဆုတ် ၄ ရက် : တနင်္လာ "

get year

String mmyear = mmdate.year();
// နမှုနာ "၁၃၈၁"

get month

String mmonth = mmdate.month();
// နမှုနာ တော်သလင်းလ

get day

String mmday = mmdate.day();
//နမှုနာ သောကြာ

get nextday

String mmnextday = mmdate.nextday(10);
//နမှုနာ ယနေ့ရက်မှစပြီးနောက်ထပ် ၁၀ ရက်မြောက်နေ့ ရက်စွဲအား တွက်ချက်ပါသည် ။

Features and bugs

အသုံးပြရာတွင် issue များတွေ့ပါက ကျွန်ပ်ထံသို့ အကြောင်းကြားပေးပါ issue tracker.

Credit..

yan9a :https://yan9a.github.io/mcal

Website 1 :http://cool-emerald.blogspot.com/2013/06/algorithm-program-and-calculation-of.html

License

 BSD 3-Clause License

 Copyright (c) 2020, Ko Htut (Ko Min Than Htut) All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this
    list of conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

   3. Neither the name of the copyright holder nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.