Constants
WEEK_EN
Array containing full English names for all seven days of the week starting from Sunday.
The WEEK_EN constant is an array containing the full English weekday names ordered from Sunday at index 0 through Saturday at index 6. This ordering matches the standard JavaScript day index convention returned by the getDay method, allowing seamless weekday lookups in English interfaces.
Import
import { WEEK_EN } from "nepali-date-library";Value
export const WEEK_EN = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
];Index Mapping
| Index | Day Name |
|---|---|
0 | "Sunday" |
1 | "Monday" |
2 | "Tuesday" |
3 | "Wednesday" |
4 | "Thursday" |
5 | "Friday" |
6 | "Saturday" |
Examples
Getting Current Weekday Name
import { WEEK_EN, NepaliDate } from "nepali-date-library";
const date = new NepaliDate("2081-01-25");
console.log(WEEK_EN[date.getDay()]); // "Thursday"Related
WEEK_SHORT_EN: Abbreviated English weekday names.WEEK_NP: Devanagari Nepali weekday names.NepaliDate.getDayName(): Static helper with locale options.
Advertisement
MONTH_SHORT_NP
Array containing abbreviated Devanagari Nepali names for all twelve Bikram Sambat calendar months.
WEEK_NP
Array containing full Devanagari Nepali names for all seven days of the week starting from Sunday.