aboutsummaryrefslogtreecommitdiff
path: root/module/vulgar/components.scm
blob: 740e64c3d45e242adb1c3a69c33f7d73839d8a39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(define-module (vulgar components)
  #:use-module (datetime)
  #:use-module (hnh util)
  #:export ())

(define-public (display-calendar-header! date)
  (let ((day   (number->string (day   date)))
        (month (number->string (month date)))
        (year  (number->string (year  date))))
    ;; BSD cal only supports setting highlighted day explicitly for
    ;; testing the functionality. This seems to at least give me
    ;; an (almost) working display, albeit ugly.
    (if (file-exists? "/usr/bin/ncal")
        (system* "ncal" "-3" "-H" (date->string date)
                 month year)
        (system* "cal" "-3" day month year))))