Added My Schedule tab in attendance screen
Allow 1 Day, Whole Week and Date Range swapping
This commit is contained in:
@@ -61,6 +61,21 @@ class AppTime {
|
||||
/// Renders a [DateTime] in 12‑hour clock notation with AM/PM suffix.
|
||||
///
|
||||
/// Example: **08:30 PM**. Used primarily in workforce-related screens.
|
||||
/// Creates a [DateTime] in the app timezone (Asia/Manila) from date/time components.
|
||||
///
|
||||
/// Use this instead of [DateTime] constructor when building a Manila-aware
|
||||
/// timestamp from separate year/month/day/hour/minute values so that
|
||||
/// `.toUtc()` correctly accounts for the +08:00 offset.
|
||||
static DateTime fromComponents({
|
||||
required int year,
|
||||
required int month,
|
||||
required int day,
|
||||
int hour = 0,
|
||||
int minute = 0,
|
||||
}) {
|
||||
return tz.TZDateTime(tz.local, year, month, day, hour, minute);
|
||||
}
|
||||
|
||||
static String formatTime(DateTime value) {
|
||||
final rawHour = value.hour;
|
||||
final hour = (rawHour % 12 == 0 ? 12 : rawHour % 12).toString().padLeft(
|
||||
|
||||
Reference in New Issue
Block a user