k-dates
npm package for formatting date and time, support multi languange (indonesian & english)
Supported languange
- English ("en")
- Indonesian ("id")
How To Use
Import the function
const kDate = ;
return current date with format "YYYY-MM-DD"
console;
return current full month name with format "DD-MMMM-YYYY in spesific languange'
// <english (default)>console; // <indonesian>console;
return current full day name with format "DDDD, DD-MM-YYYY in spesific languange'
// <english (default)>console; // <indonesian>console;
return full month name only
// <english (default)>console; // Will return 'January' // <indonesia>console; // Will return 'Januari'
Supported date format
- YYYY-MM-DD (2020-12-25).
- DD-MM-YYYY (25-12-2020).
- DD-MMM-YYYY (25-Dec-2020).
- DD-MMMM-YYYY (25-December-2020).
- MM-DD-YYYY (12-25-2020).
- DDD, DD-MM-YYYY (Fri, 25-12-2020).
- DDDD, DD-MM-YYYY (Friday, 25-12-2020).
- DDD, DD-MMM-YYYY (Fri, 25-Dec-2020).
- DDD, DD-MMMM-YYYY (Fri, 25-December-2020).
- DDDD, DD-MMM-YYYY (Fri, 25-Dec-2020).
- DDDD, DD-MMMM-YYYY (Friday, 25-December-2020).