yearMonthDayTime static method
DateTimeFormatter
yearMonthDayTime({
- Locale? locale,
- DateTimeAlignment? alignment,
- DateTimeLength? length,
- TimePrecision? timePrecision,
- YearStyle? yearStyle,
Formatting the year, month, day, and time.
Example:
import 'package:intl4x/datetime_format.dart';
void main() {
final date = DateTime(2021, 12, 17, 4, 0, 42);
print(DateTimeFormat.yearMonthDayTime().format(date)); // Output: 'Dec 17, 2021, 4:00 AM'
}
Implementation
static DateTimeFormatter yearMonthDayTime({
Locale? locale,
DateTimeAlignment? alignment,
DateTimeLength? length,
TimePrecision? timePrecision,
YearStyle? yearStyle,
}) => DateTimeFormatImpl.build(locale ?? findSystemLocale()).ymdt(
alignment: alignment,
length: length,
timePrecision: timePrecision,
yearStyle: yearStyle,
);