Function adas.xxdate

def xxdate(fullyear=False)

Returns the current date formatted as DD-MM-YY.

Parameters

fullyear : bool
If True return the full year. The default is to return the abbreviated year without the century.

Returns

str
Current date.

Notes

Pure python code. ADAS uses the same routine name in fortran and IDL so this is a convenience routine for programming within ADAS.

Version History

  • Martin O'Mullane, 19-11-2019

    • First version
  • Martin O'Mullane, 09-06-2021

    • Use datetime.now rather than utcnow to take account of summer time.
  • Martin O'Mullane, 24-07-2023

    • Add optional fullyear parameter.

Example

If today is 17th March 2018.

>>> import adas as adas
>>> adas.xxdate()
'17-03-18'
>>> adas.xxdate(fullyear=True)                                              
'17-03-2018'