Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object.assign(Date, {
- emojiclocks: [11,...Array(23).keys()].map(c=>String.fromCodePoint(128336+c%12))
- }, {
- dayperiods: ` ${['',...
- 'evening afternoon morning night'
- .split(/ /)].copyWithin(0,4).join(' ')} `
- .replace(/\w+ /g, (w, i) => w.repeat(i / 7 + 3))
- .match(/\w+/g)
- .reverse()
- .slice(1)
- }, {
- weekdays: ['', ...[...Array(7).keys()].map(weekday => new Date(2e3, 1, weekday).toLocaleString('en', ({
- weekday: 'long'
- })))]
- }, {
- months: ['', ...[...Array(12).keys()].map(month => new Date(2e3, month).toLocaleString('en', ({
- month: 'long'
- })))]
- }, {
- quarters: /../g [Symbol.match]
- `thstndrd`.reduce((acc, itr, idx, arr) => ({
- ...acc,
- [`q${++idx}`]: `${idx}${arr[(idx-20)%10] || arr[idx] || arr[0]} Quarter`
- }), {})
- });
Add Comment
Please, Sign In to add comment