1.0.1 • Published 2 years ago

@maybejaybe/date-lib v1.0.1

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

Date Lib

npm

NPM

GitHub file size in bytes

GitHub issues

Javascript Library of date functions created to make life just a little easier when it comes to calling dates in a project.

Assignment elaborated here

Published npm package here


Challenge 1

Instantiate date string with parameters for year, month, date, hours, mins, secs, etc. Create a class that holds a Date object as a property and accepts and passes parameters to initialized Date objects.


Challenge 2

Provide readable values for Date elements using getters. Remember that the index starts at 0 when displaying correct dates.


Challenge 3

Create a format method that takes a "mask" string, which will contain formatting characters to display Date elements easier.

Character codes:

  • Y - Year (2022)
  • y - Abbreviated Year (22)
  • O - Month (April)
  • o - Abbreviated Month (Apr)
  • M - Padded Month Date (04)
  • m - Month Date (4)
  • D - Day (Friday)
  • d - Abbreviated Day (Fri)
  • T - Padded Date (08)
  • t - Date (8)
  • H - Padded Hour (08)
  • h - Hour (8)
  • I - Padded Minute (08)
  • i - Minute (8)
  • S - Padded Seconds (08)
  • s - Seconds (8)

Challenge 4

Make a when() function that returns a readable description of when a date will occur.

example: 3 months from now.


Challenge 5

Document library by writing JS Doc string comments describing each method and output to repo or write it in README.md file.


Challenge 6

Write unit tests for all properties and methods in the date library.


Challenge 7

Publish to npm. include the following badges in README.md:

  • npm version
  • license
  • size
  • GitHub issues
acornacorn-walkansi-regexacorn-globalsansi-stylesababansi-escapesargparseanymatchbabel-jestbabel-plugin-jest-hoistbabel-plugin-istanbulbabel-preset-current-node-syntaxbabel-preset-jestbalanced-matchbrace-expansionbracesbrowserslistagent-basebuffer-fromcallsitesasynckitcaniuse-litebrowser-process-hrtimechalkchar-regexci-infococliuicolor-convertcolor-namebserconcat-mapcamelcaseconvert-source-mapcombined-streamcjs-module-lexercollect-v8-coveragecross-spawndebugdedentdeep-iscssomdata-urlsdecimal.jscssstyledetect-newlinediff-sequenceselectron-to-chromiumemitteryerror-exemoji-regexdeepmergeescape-string-regexpesprimaescaladeexecaestraverseesutilsdomexceptionexpectdelayed-streamfill-rangefast-levenshteinfind-upfast-json-stable-stringifyescodegenfs.realpathfunction-bindgensyncget-caller-fileexitfseventsget-streamglobglobalsgraceful-fshas-flaghasfb-watchmanform-datahttp-proxy-agenthuman-signalsget-package-typeimport-localhtml-escaperimurmurhashhtml-encoding-snifferinflightinheritsis-core-moduleis-fullwidth-code-pointis-arrayishis-generator-fnis-numberis-typedarrayisexeis-streamhttps-proxy-agenticonv-liteis-potential-custom-element-namejest-circusistanbul-lib-coverageistanbul-lib-instrumentjest-cliistanbul-lib-reportjest-configjest-diffjest-docblockistanbul-lib-source-mapsjest-get-typejest-eachjest-environment-nodejest-haste-mapistanbul-reportsjest-changed-filesjest-matcher-utilsjest-mockjest-regex-utiljest-environment-jsdomjest-resolvejest-leak-detectorjest-runnerjest-message-utiljest-serializerjest-snapshotjest-utiljest-watcherjest-runtimejest-validatejs-tokensjs-yamljest-workerjsescjest-jasmine2json-parse-even-better-errorsjest-pnp-resolverjsdomjest-resolve-dependencieslevnlocate-pathlodashlru-cachejson5makeerrorlines-and-columnsmerge-streamlevenmicromatchmimic-fnminimatchmskleurmake-dirnatural-comparenode-releasesnormalize-pathnpm-run-pathmime-typesonetimeonceoptionatorp-limitp-locatep-trymime-dbpath-existsparse-jsonpath-is-absolutepath-keynode-int64picomatchpiratesnwsapipkg-dirprelude-lspretty-formatparse5path-parsepunycoderesolveresolve-cwdrequire-directoryresolve-fromresolve.exportsrimrafsafe-bufferpicocolorspslsemvershebang-commandshebang-regexsignal-exitpromptsreact-issource-mapslashsource-map-supportsafer-buffersprintf-jsstring-lengthstring-widthstrip-ansistrip-bomstrip-final-newlinestrip-json-commentssupports-hyperlinksterminal-linksaxessupports-colorsisteransithroattmplto-fast-propertiesstack-utilsto-regex-rangetype-checksupports-preserve-symlinks-flagtype-detectsymbol-treetypedarray-to-buffertype-festtest-excludetr46tough-cookiewalkerv8-to-istanbulw3c-hr-timew3c-xmlserializeruniversalifywebidl-conversionswhichword-wrapwrappywrite-file-atomicwhatwg-mimetypewrap-ansiwhatwg-encodingwsy18nyargsyallistyargs-parserwhatwg-urlxml-name-validatorxmlchars
1.0.1

2 years ago

1.0.0

2 years ago