The Source for Java Technology Collaboration

As the new Java.net infrastructure contains project-level wikis, this main wiki will be shut down in the near future. For wiki page export and general wiki questions please contact the site admin at communitymanager@java.net.

JSR 310 Date and Time - Choice - Calendar field names

Calendar fields (such as day of week and hour of day) have names.

There are two basic naming strategies:

Option 1 - Consistent

The consistent option names fields using 'of' in the middle, like unitOfRange.

  • SecondOfMinute
  • MinuteOfHour
  • MinuteOfDay
  • HourOfDay
  • HourOfMeridiem
  • DayOfWeek
  • DayOfMonth
  • DayOfYear
  • MonthOfYear
  • Year - no 'Of' as year is unbound

Option 2 - Focussed

The focussed option names fields using just the unit for all the common cases, unless there is ambiguity as to the common case. All other fields are named as per option 1.

  • Second
  • Minute
  • MinuteOfDay
  • Hour
  • HourOfMeridiem
  • DayOfWeek
  • DayOfMonth
  • DayOfYear
  • Month
  • Year


Topic DateTimeCalendarFieldNames . { Edit | Ref-By | Printable | Diffs r2 < r1 | More }
 XML java.net RSS

  

Revision r2 - 2007-11-12 - 18:19:55 - scolebourne
Parents: WebHome > DateTimeAPI > DateTimeScope > DateTimeChoices