QDateTimeExtensions extension
DateTime extensions for QUtils
Provides convenient extension methods on DateTime objects for formatting, manipulation, and relative time calculations.
- on
Properties
- dayName → String
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the name of the day of weekno setter - dayNameShort → String
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the short name of the day of weekno setter - endOfDay → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the end of the day (23:59:59.999)no setter - endOfMonth → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the end of the monthno setter - endOfWeek → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the end of the week (Sunday)no setter - isToday → bool
-
Available on DateTime, provided by the QDateTimeExtensions extension
Check if this DateTime is todayno setter - isTomorrow → bool
-
Available on DateTime, provided by the QDateTimeExtensions extension
Check if this DateTime is tomorrowno setter - isYesterday → bool
-
Available on DateTime, provided by the QDateTimeExtensions extension
Check if this DateTime is yesterdayno setter - monthName → String
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the name of the monthno setter - monthNameShort → String
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the short name of the monthno setter - quarter → int
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the quarter of the year (1-4)no setter - startOfDay → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the start of the day (00:00:00)no setter - startOfMonth → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the start of the monthno setter - startOfWeek → DateTime
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the start of the week (Monday)no setter - weekOfYear → int
-
Available on DateTime, provided by the QDateTimeExtensions extension
Get the week of yearno setter
Methods
-
addMonths(
int months) → DateTime -
Available on DateTime, provided by the QDateTimeExtensions extension
Add months to this DateTime -
addYears(
int years) → DateTime -
Available on DateTime, provided by the QDateTimeExtensions extension
Add years to this DateTime -
format(
String format, {String? locale}) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime using the specified format string -
timeAgo(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Returns a human-readable relative time string -
toDateString(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime as date only (yyyy-MM-dd) -
toIso(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime as ISO8601 string -
toReadable(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime as readable format (MMM dd, yyyy) -
toReadableWithTime(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime as readable with time (MMM dd, yyyy HH:mm) -
toTimeString(
) → String -
Available on DateTime, provided by the QDateTimeExtensions extension
Formats this DateTime as time only (HH:mm:ss)