Advertisement
Guest User

emr phone calendar example

a guest
Jan 21st, 2025
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. default phone.system.date = datetime.datetime(2025, 1, 21)
  2.  
  3. init python:
  4. import datetime
  5.  
  6. def add_calendar_description(desc, year=None, month=None, day=None, key=None):
  7. date = phone.system.get_date()
  8.  
  9. if year is None: year = date.year
  10. if month is None: month = date.month
  11. if day is None: day = date.day
  12.  
  13. if key is None: key = "mc"
  14.  
  15. c = phone.calendar.get_calendar(year, month, key)
  16. c[day].description = desc
  17.  
  18. phone.calendar.add_calendar_to_all_characters(
  19. 2025, 1, phone.calendar.MONDAY
  20. )
  21.  
  22. label emy_date:
  23. "stuff"
  24.  
  25. $ add_calendar_description("when on a date with emy")
  26. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement