# date_func.h File Reference

Functions related to dates. More...

`#include "date_type.h"`

Go to the source code of this file.

## Functions
void | SetDate (Date date)
void | ConvertDateToYMD (Date date, YearMonthDay *ymd)
| Converts a Date to a Year, Month & Day.
Date | ConvertYMDToDate (Year year, Month month, Day day)
| Converts a tupe of Year, Month and Day to a Date.
## Variables
Year | _cur_year
Month | _cur_month
Date | _date
DateFract | _date_fract

## Detailed Description

Functions related to dates.

Definition in file date_func.h.

## Function Documentation

void ConvertDateToYMD | ( | Date | date,
|  | YearMonthDay * | ymd |
| ) |  |  |

Converts a Date to a Year, Month & Day.

Parameters:

  | date | the date to convert from
  | ymd | the year, month and day to write to

Definition at line 90 of file date.cpp.

Referenced by ClickChangeDateCheat(), DrawVehiclePurchaseInfo(), and GetSnowLine().

Date ConvertYMDToDate | ( | Year | year,
|  | Month | month,
|  | Day | day |
| ) |  |  |

Converts a tupe of Year, Month and Day to a Date.

Parameters:

  | year | is a number between 0..MAX_YEAR
  | month | is a number between 0..11
  | day | is a number between 1..31

Definition at line 146 of file date.cpp.

Referenced by ClickChangeDateCheat(), and GenerateWorld().