DateTimeTickFormatter.withoutTime constructor

DateTimeTickFormatter.withoutTime(
  1. DateTimeFactory dateTimeFactory
)

Creates a DateTimeTickFormatter without the time component.

Implementation

factory DateTimeTickFormatter.withoutTime(DateTimeFactory dateTimeFactory) {
  return DateTimeTickFormatter._internal({
    23 * HOUR: TimeTickFormatterImpl(
        dateTimeFactory: dateTimeFactory,
        simpleFormat: 'd',
        transitionFormat: 'MMM d',
        transitionField: CalendarField.month),
    28 * DAY: TimeTickFormatterImpl(
        dateTimeFactory: dateTimeFactory,
        simpleFormat: 'MMM',
        transitionFormat: 'MMM yyyy',
        transitionField: CalendarField.year),
    365 * DAY: TimeTickFormatterImpl(
        dateTimeFactory: dateTimeFactory,
        simpleFormat: 'yyyy',
        transitionFormat: 'yyyy',
        transitionField: CalendarField.year),
  });
}