Skip to content

fsgreco/just-today

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Just-Today

A simple helper to get the numeric value of the actual day, month or year.
Disclaimer: this package has been done for learning purposes.

How to use it

Simply import the library and ask for named imports as day, month or year. You'll obtain their actual numeric values (at the time the script will be running).

import { month, day, year } from 'just-today'

console.log(`Today is ${day}/${month}/${year}`)

You can also obtain a more verbose and formated value providing a specific locale to the function dayMonthVerbose:

import { dayMonthVerbose } from 'just-today'

let dayMonthUSA = dayMonthVerbose('en-US')
let dayMonthITA = dayMonthVerbose('it-IT')

console.log(dayMonthUSA) // January 15

console.log(dayMonthITA) // 15 gennaio

About

A simple helper (npm package) to get the numeric value of the actual day, month or year. This package has been done for learning purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published