mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
refactor(datetime): replace enum with object (#3836)
This commit is contained in:
parent
7f5229e4da
commit
830d3878ae
@ -5,15 +5,15 @@ import { DAY, WEEK } from "./constants.ts";
|
||||
|
||||
const DAYS_PER_WEEK = 7;
|
||||
|
||||
enum Day {
|
||||
Sun,
|
||||
Mon,
|
||||
Tue,
|
||||
Wed,
|
||||
Thu,
|
||||
Fri,
|
||||
Sat,
|
||||
}
|
||||
const Day = {
|
||||
Sun: 0,
|
||||
Mon: 1,
|
||||
Tue: 2,
|
||||
Wed: 3,
|
||||
Thu: 4,
|
||||
Fri: 5,
|
||||
Sat: 6,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Returns the ISO week number of the provided date (1-53).
|
||||
|
Loading…
Reference in New Issue
Block a user