(if (string-equal system-type "android") (load-file "/storage/emulated/0/Documents/admin/emacs/daysoff.el") (load-file "~/Documents/drive/admin/emacs/daysoff.el")) (defcustom workday nil "Returns true on working days" :type 'boolean) (if (equal (format-time-string "%a") "Sat") (setq workday nil) (if (equal (format-time-string "%a") "Sun") (setq workday nil) (if (member (format-time-string "%Y-%m-%d") daysoff) (setq workday nil) (setq workday t)))) (defcustom workhours nil "Returns true during working hours" :type 'boolean) (if workday (if (< (string-to-number (format-time-string "%H")) 19) (if (> (string-to-number (format-time-string "%H")) 7) (setq workhours t))))