otp.date#
- class date(first_arg, month=None, day=None)#
Bases:
onetick.py.types.datetimeClass
dateis used for representing date in onetick-py. It can be used both when specifying start and end time for queries and in column operations withonetick.py.Source.- Parameters
first_arg (int, str,
otp.datetime,otp.datepandas.Timestamp,datetime.datetime,datetime.date) – If month and day arguments are specified, first argument will be considered as year. Otherwise, first argument will be converted to otp.date.month (int) – Number between 1 and 12.
day (int) – Number between 1 and 31.
Note
Class
otp.dateshare many methods that classes pandas.Timestamp anddatetime.datehave, but these objects are not fully interchangeable. Classotp.dateshould work in all onetick-py methods and classes, other classes should work too if documented, and may even work when not documented, but the users should not count on it.Examples