cdm/src/main/java/ucar/nc2/time/CalendarDate.java
public int getFieldValue(CalendarPeriod.Field fld) {
    switch (fld) {
      case Day: return dateTime.get(DateTimeFieldType.dayOfMonth());
      case Hour: return dateTime.get(DateTimeFieldType.hourOfDay());
      case Millisec: return dateTime.get(DateTimeFieldType.millisOfSecond());
      case Minute: return dateTime.get(DateTimeFieldType.minuteOfHour());
      case Month: return dateTime.get(DateTimeFieldType.monthOfYear());
      case Second: return dateTime.get(DateTimeFieldType.secondOfMinute());
      case Year: return dateTime.get(DateTimeFieldType.year());
    }
    throw new IllegalArgumentException("unimplemented "+fld);
  }
public int getFieldValue(CalendarPeriod.Field fld) {
    switch (fld) {
      case Day: return dateTime.get(DateTimeFieldType.dayOfMonth());
      case Hour: return dateTime.get(DateTimeFieldType.hourOfDay());
      case Millisec: return dateTime.get(DateTimeFieldType.millisOfSecond());
      case Minute: return dateTime.get(DateTimeFieldType.minuteOfHour());
      case Month: return dateTime.get(DateTimeFieldType.monthOfYear());
      case Second: return dateTime.get(DateTimeFieldType.secondOfMinute());
      case Year: return dateTime.get(DateTimeFieldType.year());
    }
    throw new IllegalArgumentException("unimplemented "+fld);
  }
public int getFieldValue ( CalendarPeriod . Field fld ) { switch ( fld ) { case Day : return dateTime . get ( DateTimeFieldType . dayOfMonth ( ) ) ; case Hour : return dateTime . get ( DateTimeFieldType . hourOfDay ( ) ) ; case Millisec : return dateTime . get ( DateTimeFieldType . millisOfSecond ( ) ) ; case Minute : return dateTime . get ( DateTimeFieldType . minuteOfHour ( ) ) ; case Month : return dateTime . get ( DateTimeFieldType . monthOfYear ( ) ) ; case Second : return dateTime . get ( DateTimeFieldType . secondOfMinute ( ) ) ; case Year : return dateTime . get ( DateTimeFieldType . year ( ) ) ; } throw new IllegalArgumentException ( "unimplemented " + fld ) ; }
/*
Millisec(PeriodType.millis()), Second(PeriodType.seconds()), Minute(PeriodType.minutes()), Hour(PeriodType.hours()),
Day(PeriodType.days()), Month(PeriodType.months()), Year(PeriodType.years())
/ * Millisec ( PeriodType . millis () ) Second ( PeriodType . seconds () ) Minute ( PeriodType . minutes () ) Hour ( PeriodType . hours () ) Day ( PeriodType . days () ) Month ( PeriodType . months () ) Year ( PeriodType . years () )