Skip to content

Instantly share code, notes, and snippets.

View alahdal's full-sized avatar

Abdullah Alahdal alahdal

View GitHub Profile
//Orginal code from: https://gist.github.com/mecid/f8859ea4bdbd02cf5d440d58e936faec
//I just made some modification in appearnce, show monthly navigator and weekdays.
import SwiftUI
struct ContentView: View {
@Environment(\.calendar) var calendar
private var year: DateInterval {
calendar.dateInterval(of: .month, for: Date())!
@alahdal
alahdal / revenuecat.py
Last active August 21, 2021 19:26
A snippet to get the subscription status from RevenueCat.
# Below snippet to help using RevenueCat API as descibed in below link
# https://docs.revenuecat.com/docs/purchaserinfo
import json
import urllib3
from datetime import datetime
# To call the function, you should pass the app user id, the API Key and the entitlement that you would like to check,.