Package: pydate-fns
pydate-fnsA sensible Python date libraryInstallationpipinstallpydate-fnsUsagefromdatetimeimportdatetimefrompydateimportis_weekday,ifis_weekday(datetime.now()):print("It's a weekday")else:print("It's the weekend 😎")date-fns methods paritymethodaddaddBusinessDaysaddDaysaddHoursaddISOWeekYearsaddMillisecondsaddMinutesaddMonthsaddQuartersaddSecondsaddWeeksaddYearsareIntervalsOverlappingclampclosestIndexToclosestTocompareAsccompareDescconstantsconstructFromdaysToWeeksdifferenceInBusinessDaysdifferenceInCalendarDaysdifferenceInCalendarISOWeekYearsdifferenceInCalendarISOWeeksdifferenceInCalendarMonthsdifferenceInCalendarQuartersdifferenceInCalendarWeeksdifferenceInCalendarYearsdifferenceInDaysdifferenceInHoursdifferenceInISOWeekYearsdifferenceInMillisecondsdifferenceInMinutesdifferenceInMonthsdifferenceInQuartersdifferenceInSecondsdifferenceInWeeksdifferenceInYearseachDayOfIntervaleachHourOfIntervaleachMinuteOfIntervaleachMonthOfIntervaleachQuarterOfIntervaleachWeekOfIntervaleachWeekendOfIntervaleachWeekendOfMontheachWeekendOfYeareachYearOfIntervalendOfDayendOfDecadeendOfHourendOfISOWeekendOfISOWeekYearendOfMinuteendOfMonthendOfQuarterendOfSecondendOfTodayendOfTomorrowendOfWeekendOfYearendOfYesterdayformatformatDistanceformatDistanceStrictformatDistanceToNowformatDistanceToNowStrictformatDurationformatISOformatISO9075formatISODurationformatRFC3339formatRFC7231formatRelativefpfromUnixTimegetDategetDaygetDayOfYeargetDaysInMonthgetDaysInYeargetDecadegetDefaultOptionsgetHoursgetISODaygetISOWeekgetISOWeekYeargetISOWeeksInYeargetMillisecondsgetMinutesgetMonthgetOverlappingDaysInIntervalsgetQuartergetSecondsgetTimegetUnixTimegetWeekgetWeekOfMonthgetWeekYeargetWeeksInMonthgetYearhoursToMillisecondshoursToMinuteshoursToSecondsintervalToDurationintlFormatintlFormatDistanceisAfterisBeforeisDateisEqualisExistsisFirstDayOfMonthisFridayisFutureisLastDayOfMonthisLeapYearisMatchisMondayisPastisSameDayisSameHourisSameISOWeekisSameISOWeekYearisSameMinuteisSameMonthisSameQuarterisSameSecondisSameWeekisSameYearisSaturdayisSundayisThisHourisThisISOWeekisThisMinuteisThisMonthisThisQuarterisThisSecondisThisWeekisThisYearisThursdayisTodayisTomorrowisTuesdayisValidisWednesdayisWeekendisWithinIntervalisYesterdaylastDayOfDecadelastDayOfISOWeeklastDayOfISOWeekYearlastDayOfMonthlastDayOfQuarterlastDayOfWeeklastDayOfYearlightFormatlocalemaxmillisecondsmillisecondsToHoursmillisecondsToMinutesmillisecondsToSecondsminminutesToHoursminutesToMillisecondsminutesToSecondsmonthsToQuartersmonthsToYearsnextDaynextFridaynextMondaynextSaturdaynextSundaynextThursdaynextTuesdaynextWednesdayparseparseISOparseJSONpreviousDaypreviousFridaypreviousMondaypreviousSaturdaypreviousSundaypreviousThursdaypreviousTuesdaypreviousWednesdayquartersToMonthsquartersToYearsroundToNearestMinutessecondsToHourssecondsToMillisecondssecondsToMinutessetsetDatesetDaysetDayOfYearsetDefaultOptionssetHourssetISODaysetISOWeeksetISOWeekYearsetMillisecondssetMinutessetMonthsetQuartersetSecondssetWeeksetWeekYearsetYearstartOfDaystartOfDecadestartOfHourstartOfISOWeekstartOfISOWeekYearstartOfMinutestartOfMonthstartOfQuarterstartOfSecondstartOfTodaystartOfTomorrowstartOfWeekstartOfWeekYearstartOfYearstartOfYesterdaysubsubBusinessDayssubDayssubHourssubISOWeekYearssubMillisecondssubMinutessubMonthssubQuarterssubSecondssubWeekssubYearstoDatetransposeweeksToDaysyearsToMonthsyearsToQuarters