Skip to content

short local module for date strings to look like time dates on social media

License

Notifications You must be signed in to change notification settings

Jeppe006/SmartFormatDate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartFormatDate

Made for making beautiful date strings for social medias, blogs, forums and much more!
This is not meant to replace any existing modules 🙂.

Easy to use!

To get the JS file go to compiled. For the TS file go to src.

Supported languages

English: en-US
Swedish: sv-EU
Norwegian: no-EU
Danish: dk-EU
Finnish: fi-EU
German: de-EU

Variables

Date : Date Object
language : string
format : string [ "long" | "short" | "narrow" ]

Usage:

SmartDate

let date = new Date() // Gets current date, if you want a different date then put an string. Example: Date("2023-1-1")
let date_format = new SmartFormat(date,"en-US","long").SmartDate() // Returns a string

console.log(date_format)
Output: Today

About

short local module for date strings to look like time dates on social media

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published