final21-project
v1.0.0
Published
date and time library
Downloads
1
Readme
Figment - a simple datetime lib
figs aren't dates but time isn't real
- [x] Challenge 0: Setup Project
- [x] Challenge 1: Create Class to instantiate Date obj
- [x] Challenge 2: Human readable values:
- [x] year
- [x] month
- [x] date
- [x] hour
- [x] mins
- [x] secs
- [x] Challenge 3: Format method that takes a "mask" string
- [x] default formatted date with no parameters
- [x] List of formatting characters:
- [x] 'Y' -> 2019 (Year full)
- [x] 'y' -> 19 (Year short)
- [x] 'M' -> July (Month full)
- [x] 'm' -> Jul (Month short)
- [x] 'D' -> 01 (date padded)
- [x] 'd' -> 1 (date)
- [x] 'H' -> 05 (Hours padded)
- [x] 'h' -> 5 (Hours)
- [x] 'I' -> 08 (Minutes padded)
- [x] 'i' -> 8 (Minutes)
- [x] 'S' -> 04 (Seconds padded)
- [x] 's' -> 4 (Seconds)
- [x] Stretch: Add Day of Week
- [x] Stretch: Add short Day of Week
- [ ] TODO: Add 12/24 hour
- [x] Challenge 4:
when()method- [ ] Stretch:
when()edge cases - [ ] Stretch: make work for hours, min, seconds
- [ ] Stretch: include date & time
- [ ] Stretch:
- [x] Challenge 5: Document date-lib with JSDoc
- [ ] Challenge 6: Write Unit Tests
- [ ] Challenge 7: Publish to npm with these badges:
- [ ] npm version
- [ ] license
- [ ] size
- [ ] GitHub Issues
- [ ] Stretch:
.toPrimitive()to return String or Num depending on context
References
- Date Format By Country Wiki https://en.wikipedia.org/wiki/Date_format_by_country
- Luxon https://moment.github.io/luxon/
