Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.babelrc
.editorconfig
.gitignore
.travis.yml
LICENSE
gulpfile.js
package.json
readme.md
webpack.config.js

readme.md

MYCAL

Myanmar Calendar

Build Status npm contributions welcome License: MIT NSP Status

Algorithm

Algorithm, Program and Calculation of Myanmar Calendar

Installation

npm

npm install --save mycal

web

<script src="https://unpkg.com/mycal@latest/dist/client/mycal.min.js"></script>

API

Day

Day
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {day} = myanmarDate;
console.log(day);
// {
//    fd:{
//       en:'9',
//       my:'၉'
//    },
//    mp:{
//       en:'Waning',
//       my:'လပြည့်ကျော်'
//    }
// }

Weekday

Weekday
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {weekday} = myanmarDate;
console.log(weekday);
// {
//    en:'Sunday',
//    my:'တနင်္ဂနွေ'
// }

Month

Month
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {month} = myanmarDate;
console.log(month);
// {
//    en:'Pyatho',
//    my:'ပြာသို'
// }

Year

Year
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {year} = myanmarDate;
console.log(year);
// {
//    en:'1309',
//    my:'၁၃၀၉'
// }

Buddhist Era Year

Buddhist Era Year
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {buddhistEraYear} = myanmarDate;
console.log(buddhistEraYear);
// {
//    en:'2491',
//    my:'၂၄၉၁'
// }

THINGYAN

THINGYAN
const mycal = require('mycal');
//mycal
//new mycal('month/day/year');

//for today date
//use without params
//new mycal()
const myanmarDate = new mycal('1/4/1948');

const {thingyan} = myanmarDate;
console.log(thingyan);
// {
//    akyo:'4/13/1947',
//    akya:'4/14/1947',
//    akyat:[
//       '4/15/1947'
//    ],
//    atat:'4/16/1947',
//    new_year_day:'4/17/1947',
//    akyaTime:'4/14/1947, 8:47:18 AM',
//    atatTime:'4/16/1947, 12:48:30 PM'
// }

Usage

Usage
const mycal = require('mycal');

const today = new mycal();

//mycal
//new mycal('month/day/year');
const myanmarDate = new mycal('1/4/1948');

const {weekday, day, month, year, buddhistEraYear, thingyan} = myanmarDate;

console.log(weekday);
// {
//    en:'Sunday',
//    my:'တနင်္ဂနွေ'
// }
console.log(day);
// {
//    fd:{
//       en:'9',
//       my:'၉'
//    },
//    mp:{
//       en:'Waning',
//       my:'လပြည့်ကျော်'
//    }
// }
console.log(month);
// {
//    en:'Pyatho',
//    my:'ပြာသို'
// }
console.log(year);
// {
//    en:'1309',
//    my:'၁၃၀၉'
// }
console.log(buddhistEraYear);
// {
//    en:'2491',
//    my:'၂၄၉၁'
// }
console.log(thingyan);
// {
//    akyo:'4/13/1947',
//    akya:'4/14/1947',
//    akyat:[
//       '4/15/1947'
//    ],
//    atat:'4/16/1947',
//    new_year_day:'4/17/1947',
//    akyaTime:'1947-04-14T02:17:18.868Z',
//    atatTime:'1947-04-16T06:18:30.868Z'
// }

Test

npm t

Build

npm run build

License

MIT