Last active
March 14, 2024 12:37
-
-
Save gahms/37a5ca9f40f1c3ec90645430942e8936 to your computer and use it in GitHub Desktop.
DartPad date format example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:intl/date_symbol_data_local.dart'; | |
| import 'package:intl/intl.dart'; | |
| void main() async { | |
| await initializeDateFormatting(); | |
| final dt = DateTime.now(); | |
| print(DateFormat.yMd('en_UK').format(dt)); | |
| print(DateFormat.yMd('da_DK').format(dt)); | |
| print(DateFormat('dd.MM.yyyy').format(dt)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment