datetime
relationalai.semantics.std
Date and time manipulation functions.
This module provides comprehensive date and datetime operations including:
- Date construction, parsing, and formatting
- DateTime construction, parsing, and formatting
- Date and time component extraction (year, month, day, hour, minute, second)
- Date and time arithmetic (add, subtract)
- Date and time ranges
- Time period constructors (days, hours, minutes, seconds, etc.)
- ISO format constants for standardized formatting
Attributes
Section titled “Attributes”Attributes exposed by this module.
Frequency Type alias for time frequency strings used in date and datetime range operations.
DatePart Type alias for date part strings used in date difference calculations.
DateTimePart Type alias for datetime part strings used in datetime difference calculations.
Functions
Section titled “Functions”Functions exposed by this module.
nanoseconds() Create a nanoseconds period.
microseconds() Create a microseconds period.
milliseconds() Create a milliseconds period.
seconds() Create a seconds period.
minutes() Create a minutes period.
hours() Create an hours period.
days() Create a days period.
weeks() Create a weeks period.
months() Create a months period.
years() Create a years period.
Classes
Section titled “Classes”Classes exposed by this module.
ISO ISO format string constants for date and datetime formatting.
date Construct a date from year, month, and day.
datetime Construct a datetime from components.
Referenced By
Section titled “Referenced By”RelationalAI Documentation └── Build With RelationalAI └── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning └── Use dates and datetimes └── Extract date and time components