mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: add leading zeros to day & month in date format (#6114)
This commit is contained in:
parent
61ad75502f
commit
0fd0900b41
@ -1,11 +1,11 @@
|
||||
import 'package:appflowy_backend/protobuf/flowy-user/date_time.pbenum.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
const _localFmt = 'M/d/y';
|
||||
const _usFmt = 'y/M/d';
|
||||
const _isoFmt = 'y-M-d';
|
||||
const _friendlyFmt = 'MMM d, y';
|
||||
const _dmyFmt = 'd/M/y';
|
||||
const _localFmt = 'MM/dd/y';
|
||||
const _usFmt = 'y/MM/dd';
|
||||
const _isoFmt = 'y-MM-dd';
|
||||
const _friendlyFmt = 'MMM dd, y';
|
||||
const _dmyFmt = 'dd/MM/y';
|
||||
|
||||
extension DateFormatter on UserDateFormatPB {
|
||||
DateFormat get toFormat => DateFormat(_toFormat[this] ?? _friendlyFmt);
|
||||
|
@ -1,5 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
|
||||
@ -43,7 +45,6 @@ import 'package:flowy_infra/theme.dart';
|
||||
import 'package:flowy_infra/theme_extension.dart';
|
||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
||||
import 'package:flowy_infra_ui/style_widget/hover.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user