Skip to content

Brand0n1/time-formatting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Time Formatting

When formatting a date there is multiple diffrent patterns you can use. You can found out more about this by reading the Java docs by Oracle.

Understanding the different components of date formatting

Lets start off by saying that the dashes : don't have anything to do with the actual formatting, and are just added in so it reads nicer.

  • HH Using the capitol HH makes it so that the time will be in 24 hour format
  • hh Using the lowercase hh makes it so that the time will be in 12 hour format
  • mm Make sure to use lowercase mm in the date formatting for minutes. This is beacuse the capitol MM is used for the month.
  • ss Using the lowercase ss will result in the total seconds in the minute
  • SS Using the capitol SS will result in the total miliseconds
  • aa Using the lowercase aa will result in getting AM or PM

Pages

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published