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 week
no setter
dayNameShort String

Available on DateTime, provided by the QDateTimeExtensions extension

Get the short name of the day of week
no 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 month
no 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 today
no setter
isTomorrow bool

Available on DateTime, provided by the QDateTimeExtensions extension

Check if this DateTime is tomorrow
no setter
isYesterday bool

Available on DateTime, provided by the QDateTimeExtensions extension

Check if this DateTime is yesterday
no setter
monthName String

Available on DateTime, provided by the QDateTimeExtensions extension

Get the name of the month
no setter
monthNameShort String

Available on DateTime, provided by the QDateTimeExtensions extension

Get the short name of the month
no 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 month
no 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 year
no 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)