Skip to content
fluttersmith
/
py-snippets
Search functions or stdlib
/
Stdlib
Idioms
System
GitHub ↗
Package · 3 modules
pysnippets.
dates
Date ranges, calendar months and weekdays.
lists/
16
dicts/
8
strings/
8
numbers/
5
dates/
3
daterange
(start, end, step)
Yield the dates from start up to end, like range() for days, with an optional step.
O(1)
3.11+
months_diff
(start, end)
Count complete calendar months between two dates, the way people count them.
O(1)
3.11+
is_weekday
(day)
+1
Tell weekdays from weekends using date.weekday().
O(1)
3.11+
Search snippets and the stdlib cheat sheet
↑
↓
move
↵
open
esc
close
Keyboard shortcuts
Close
/
Search
r
Random snippet
←
→
Previous / next snippet
c
Copy the function
e
Run it in your browser
Ctrl
↵
Run again, in the editor
t
Theme: system, light, dark
?
This list