Skip to content

GetTimestampDate

imshooter edited this page Nov 26, 2026 · 1 revision

The date of a time.

native bool:GetTimestampDate(Timestamp:timestamp, &year, &month, &day, const zone[] = "");

Parameters

Parameter Description
Timestamp:timestamp The time.
&year The year.
&month The month, 1 to 12.
&day The day of the month.
const zone[] The time zone, as "UTC", or the zone of the server when left out.

Returns

  • true when it was read.
  • false when there is no such zone.

Example

stock bool:IsNewYearsDay() {
    new
        year,
        month,
        day
    ;

    GetTimestampDate(Now(), year, month, day);

    return month == 1 && day == 1;
}

Related

Clone this wiki locally