arconverter.ardate
Absalom Reckoning Date Class
Example:
ar_date = ArDate() # typically created via convert() ar_date.month = "Erastus" ar_date.day = 10 ar_date.year = 4723 print(ar_date.long_date()) "Erastus 10, 4723"
1"""Absalom Reckoning Date Class 2 3Example: 4 >>> ar_date = ArDate() # typically created via convert() 5 >>> ar_date.month = "Erastus" 6 >>> ar_date.day = 10 7 >>> ar_date.year = 4723 8 >>> print(ar_date.long_date()) 9 "Erastus 10, 4723" 10""" 11 12 13class ArDate: 14 """Represents an Absalom Reckoning Date 15 16 Examples: 17 >>> ar_date = ArDate() 18 >>> ar_date.month = "Erastus" 19 >>> ar_date.monthShort = "Era" 20 >>> ar_date.commonMonth = "Fletch" 21 >>> ar_date.day = 10 22 >>> ar_date.year = 4723 23 >>> ar_date.weekday = "Moonday" 24 >>> ar_date.weekdayShort = "Moon" 25 >>> ar_date.weekdayNum = 1 26 >>> ar_date.monthNum = 7 27 >>> ar_date.season = "Summer" 28 """ 29 30 month: str 31 day: int 32 year: int 33 weekday: str 34 weekdayShort: str 35 weekdayNum: int 36 monthNum: int 37 monthShort: str 38 commonMonth: str 39 season: str 40 41 def short_date(self) -> str: 42 """Returns a short date string 43 44 Example: 45 >>> ar_date.short_date() 46 'Era 10, 4723' 47 """ 48 return f'{self.monthShort} {self.day}, {self.year}' 49 50 def long_date(self) -> str: 51 """Returns a long date string 52 53 Example: 54 >>> ar_date.long_date() 55 'Erastus 10, 4723' 56 """ 57 return f'{self.month} {self.day}, {self.year}' 58 59 def weekday_date(self) -> str: 60 """Returns a weekday date string 61 62 Example: 63 >>> ar_date.weekday_date() 64 'Moonday Erastus 10, 4723' 65 """ 66 return f'{self.weekday} {self.month} {self.day}, {self.year}' 67 68 def common_long_month(self) -> str: 69 """Returns a long date string with common month name 70 71 Example: 72 >>> ar_date.common_long_month() 73 'Fletch 10, 4723' 74 """ 75 return f'{self.commonMonth} {self.day}, {self.year}' 76 77 def month_season(self) -> str: 78 """Returns the season for the current month 79 80 Example: 81 >>> ar_date.month_season() 82 'Summer' 83 """ 84 return self.season 85 86 def __str__(self) -> str: 87 """Returns a short date string""" 88 return self.short_date()
14class ArDate: 15 """Represents an Absalom Reckoning Date 16 17 Examples: 18 >>> ar_date = ArDate() 19 >>> ar_date.month = "Erastus" 20 >>> ar_date.monthShort = "Era" 21 >>> ar_date.commonMonth = "Fletch" 22 >>> ar_date.day = 10 23 >>> ar_date.year = 4723 24 >>> ar_date.weekday = "Moonday" 25 >>> ar_date.weekdayShort = "Moon" 26 >>> ar_date.weekdayNum = 1 27 >>> ar_date.monthNum = 7 28 >>> ar_date.season = "Summer" 29 """ 30 31 month: str 32 day: int 33 year: int 34 weekday: str 35 weekdayShort: str 36 weekdayNum: int 37 monthNum: int 38 monthShort: str 39 commonMonth: str 40 season: str 41 42 def short_date(self) -> str: 43 """Returns a short date string 44 45 Example: 46 >>> ar_date.short_date() 47 'Era 10, 4723' 48 """ 49 return f'{self.monthShort} {self.day}, {self.year}' 50 51 def long_date(self) -> str: 52 """Returns a long date string 53 54 Example: 55 >>> ar_date.long_date() 56 'Erastus 10, 4723' 57 """ 58 return f'{self.month} {self.day}, {self.year}' 59 60 def weekday_date(self) -> str: 61 """Returns a weekday date string 62 63 Example: 64 >>> ar_date.weekday_date() 65 'Moonday Erastus 10, 4723' 66 """ 67 return f'{self.weekday} {self.month} {self.day}, {self.year}' 68 69 def common_long_month(self) -> str: 70 """Returns a long date string with common month name 71 72 Example: 73 >>> ar_date.common_long_month() 74 'Fletch 10, 4723' 75 """ 76 return f'{self.commonMonth} {self.day}, {self.year}' 77 78 def month_season(self) -> str: 79 """Returns the season for the current month 80 81 Example: 82 >>> ar_date.month_season() 83 'Summer' 84 """ 85 return self.season 86 87 def __str__(self) -> str: 88 """Returns a short date string""" 89 return self.short_date()
Represents an Absalom Reckoning Date
Examples:
ar_date = ArDate() ar_date.month = "Erastus" ar_date.monthShort = "Era" ar_date.commonMonth = "Fletch" ar_date.day = 10 ar_date.year = 4723 ar_date.weekday = "Moonday" ar_date.weekdayShort = "Moon" ar_date.weekdayNum = 1 ar_date.monthNum = 7 ar_date.season = "Summer"
42 def short_date(self) -> str: 43 """Returns a short date string 44 45 Example: 46 >>> ar_date.short_date() 47 'Era 10, 4723' 48 """ 49 return f'{self.monthShort} {self.day}, {self.year}'
Returns a short date string
Example:
ar_date.short_date() 'Era 10, 4723'
51 def long_date(self) -> str: 52 """Returns a long date string 53 54 Example: 55 >>> ar_date.long_date() 56 'Erastus 10, 4723' 57 """ 58 return f'{self.month} {self.day}, {self.year}'
Returns a long date string
Example:
ar_date.long_date() 'Erastus 10, 4723'
60 def weekday_date(self) -> str: 61 """Returns a weekday date string 62 63 Example: 64 >>> ar_date.weekday_date() 65 'Moonday Erastus 10, 4723' 66 """ 67 return f'{self.weekday} {self.month} {self.day}, {self.year}'
Returns a weekday date string
Example:
ar_date.weekday_date() 'Moonday Erastus 10, 4723'
69 def common_long_month(self) -> str: 70 """Returns a long date string with common month name 71 72 Example: 73 >>> ar_date.common_long_month() 74 'Fletch 10, 4723' 75 """ 76 return f'{self.commonMonth} {self.day}, {self.year}'
Returns a long date string with common month name
Example:
ar_date.common_long_month() 'Fletch 10, 4723'