Skip to content

Instantly share code, notes, and snippets.

View JaiminBrahmbhatt's full-sized avatar
🎯
Focusing

JaiminGOD JaiminBrahmbhatt

🎯
Focusing
View GitHub Profile
@JaiminBrahmbhatt
JaiminBrahmbhatt / Solution.py
Last active November 10, 2022 18:17
Calculating invoices for customer billing
import datetime
import calendar
def bill_for(month, active_subscription, users):
# your code here!
month = datetime.datetime.strptime(month, '%Y-%m')
month = datetime.date(month.year, month.month, 1)
# first day of month
first_day = first_day_of_month(month)
# last day of month