| |
- Date
class Date |
|
A dictionary of the months w/ the number of days.
You can access it like this:
Month's name: d[12][0] ==> 'December'
Month's days: d[12][1] ==> 31 |
|
Methods defined here:
- __init__(self, year_or_date=1111, month=1, day=1)
- Constructor method, sets date to the parameters inputted.
The year, month, and day should be positive numbers.
If a date_string argument is entered, string will be
parsed and date set.
- add_N_days(self, N)
- Adds N number of days and returns as Date
- compare(self, a, b)
- Compares two date objects, which doesn't have to be THIS object.
Returns a string.
- is_leap_year(self, a)
- Tests whether a number is a leap year; returns 1 for true, 0 otherwise
- set_date(self, year, month, day)
- Sets date to input parameters. The year, month, and day
should be positive numbers.
- subtract_N_days(self, N)
- Subtracts N number of days and returns as Date
- to_string_MDY(self)
- Converts date object to "MONTH DAY, YEAR" format, and returns a string
- to_string_YMD(self)
- Converts date object to "YYYY-MM-DD" format, and returns a string
- tomorrow(self)
- Returns the next day as Date
- yesterday(self)
- Returns the previous day as Date
Data and non-method functions defined here:
- __doc__ = "A dictionary of the months w/ the number of day...December'\n Month's days: d[12][1] ==> 31"
- __module__ = 'jun'
- d = {1: ['January', 31], 2: ['February', 28], 3: ['March', 31], 4: ['April', 30], 5: ['May', 31], 6: ['June', 30], 7: ['July', 31], 8: ['August', 31], 9: ['September', 30], 10: ['October', 31], ...}
- myDate = [9999, 12, 31]
| |