Skip to content

GetTimestampWeekday

imshooter edited this page Nov 26, 2026 · 1 revision

The day of the week of a time.

native GetTimestampWeekday(Timestamp:timestamp, const zone[] = "");

Parameters

Parameter Description
Timestamp:timestamp The time.
const zone[] The time zone, as "UTC", or the zone of the server when left out.

Returns

0 for Sunday to 6 for Saturday, or -1 when there is no such zone.

Example

stock bool:IsWeekend() {
    new const
        weekday = GetTimestampWeekday(Now())
    ;

    return weekday == 0 || weekday == 6;
}

Related

Clone this wiki locally