macro(month RESULT)
  if (WIN32)
    execute_process(COMMAND "cmd" "/C date /T" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(...) (..)/(..)/(....).*" "\\2" ${RESULT} ${${RESULT}})
    string(REGEX REPLACE "0(.)" "\\1" ${RESULT} ${${RESULT}})
  else()
    execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(..)/(..)/(....)." "\\2" ${RESULT} ${${RESULT}})
    string(REGEX REPLACE "0(.)" "\\1" ${RESULT} ${${RESULT}})
  endif()
endmacro(month)

macro(day RESULT)
  if (WIN32)
    execute_process(COMMAND "cmd" "/C date /T" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(...) (..)/(..)/(....).*" "\\3" ${RESULT} ${${RESULT}})
    string(REGEX REPLACE "0(.)" "\\1" ${RESULT} ${${RESULT}})
  else()
    execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(..)/(..)/(....)." "\\1" ${RESULT} ${${RESULT}})
    string(REGEX REPLACE "0(.)" "\\1" ${RESULT} ${${RESULT}})
  endif()
endmacro(day)

macro(year RESULT)
  if (WIN32)
    execute_process(COMMAND "cmd" "/C date /T" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(...) (..)/(..)/(....).*" "\\4" ${RESULT} ${${RESULT}})
  else()
    execute_process(COMMAND "date" "+%d/%m/%Y" OUTPUT_VARIABLE ${RESULT})
    string(REGEX REPLACE "(..)/(..)/(....)." "\\3" ${RESULT} ${${RESULT}})
  endif()
endmacro(year)

macro(get_the_date _DAY _MONTH _YEAR)
  day(${_DAY})  
  month(${_MONTH})
  year(${_YEAR})
endmacro()