- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.1 KiB
Dart
43 lines
1.1 KiB
Dart
part of 'extension.dart';
|
|
|
|
extension DateTimeIndonesia on DateTime {
|
|
/// Format: 13 Agustus 2025
|
|
String get toDate {
|
|
return DateFormat('d MMMM yyyy', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Format: 13 Agustus 2025 20:00
|
|
String get toDatetime {
|
|
return DateFormat('d MMMM yyyy HH:mm', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Format: Rabu, 13 Agustus 2025
|
|
String get toDayDate {
|
|
return DateFormat('EEEE, d MMMM yyyy', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Format: 13/08/2025
|
|
String get toShortDate {
|
|
return DateFormat('dd/MM/yyyy', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Format: 13-08-2025
|
|
String get toServerDate {
|
|
return DateFormat('yyyy-MM-dd', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Format jam: 14:30
|
|
String get toHourMinute {
|
|
return DateFormat('HH:mm', 'id_ID').format(this);
|
|
}
|
|
|
|
/// Waktu dinding WIB (UTC+7), apa pun zona waktu perangkat.
|
|
/// Hanya untuk ditampilkan; jangan dipakai untuk membandingkan waktu.
|
|
DateTime get toWib => toUtc().add(const Duration(hours: 7));
|
|
|
|
/// Format: 13 Agu 2025 20:00
|
|
String get toShortDatetime {
|
|
return DateFormat('d MMM yyyy HH:mm', 'id_ID').format(this);
|
|
}
|
|
}
|