• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HowTo use DateFormat static field constants ?

 
Graeme Byers
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are the static fields of DateFormat (inherited by SimpleDateFormat)such as DAY_OF_YEAR intended to be used (example please)? Could I use it to build a Julian date ?
Thank you.
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DAY_OF_YEAR_FIELD, etc., can be used to return the position at which a data field was formatted. DAY_OF_YEAR_FIELD is SimpleDateFormat's %D, which is not very common. For YEAR_FIELD:It doesn't look like this will help with Julian dates.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic