Calendar Functions – Set 1:

Operations performed on calendars:

  1. calendar(year, w, I, c) – This function is used for displaying the year, width of characters, number of lines per week, and column separations.
  2. firstweekday() – It returns the first week day number. It is set by default as 0 (Monday)

  1. isleap(year) – This function helps us to identify whether the given year given as argument is a leap year or not.
  2. Leapdays(year1, year2) – This function is used to return the number of leap days between the specified years in the argument.
  3. month(year, month, w, I) – This is a function that prints the month of a specific year which is mentioned in the arguments. This function takes four arguments year, month, width of characters, and the number of lines taken by a week.

To learn more about calander in python for data science and programming, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.