Skip to content

justin-lyon/sf-date-fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sf-date-fun

Showcase conversions and formatting of Dates and Times between Apex, Javascript, and LWC Base Components.

demo

Formatting Opinion

The LWC Base Component, lightning-formatted-date-time, is a wrapper around Intl.DateTimeFormatter. By abstracting the Intl.DateTimeFormatter away, it may be marginally easier to use.

Knowing neither of these, the learning curve is identical. But direct access to the Intl.DateTimeFormatter means more options and greater control.

Knowing both of these, it's a question of where would you like the complexity / config? Would you prefer to have more code in your template (base component) or would you prefer more code in javascript (Intl)?

Resources

  1. Epoch Time
  2. GMT vs UTC
  3. Javascript MDN
  4. Salesforce

About

Goofing around with dates in Salesforce

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published