1.0.0 • Published 3 years ago

final21-project v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Figment - a simple datetime lib

Build Status Coverage Status

figs aren't dates but time isn't real

  • Challenge 0: Setup Project
  • Challenge 1: Create Class to instantiate Date obj
  • Challenge 2: Human readable values:
    • year
    • month
    • date
    • hour
    • mins
    • secs
  • Challenge 3: Format method that takes a "mask" string
    • default formatted date with no parameters
    • List of formatting characters:
      • 'Y' -> 2019 (Year full)
      • 'y' -> 19 (Year short)
      • 'M' -> July (Month full)
      • 'm' -> Jul (Month short)
      • 'D' -> 01 (date padded)
      • 'd' -> 1 (date)
      • 'H' -> 05 (Hours padded)
      • 'h' -> 5 (Hours)
      • 'I' -> 08 (Minutes padded)
      • 'i' -> 8 (Minutes)
      • 'S' -> 04 (Seconds padded)
      • 's' -> 4 (Seconds)
      • Stretch: Add Day of Week
      • Stretch: Add short Day of Week
      • TODO: Add 12/24 hour
  • Challenge 4: when() method
    • Stretch: when() edge cases
    • Stretch: make work for hours, min, seconds
    • Stretch: include date & time
  • 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