यह यह करने के लिए आसान नहीं है, कोड कैलेंडर उत्पन्न करने के लिए है:
(defun calendar-generate (month year)
"Generate a three-month Gregorian calendar centered around MONTH, YEAR."
;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
;; Note that while calendars for years BC could be displayed as it
;; stands, almost all other calendar functions (eg holidays) would
;; at best have unpredictable results for such dates.
(if (< (+ month (* 12 (1- year))) 2)
(error "Months before January, 1 AD cannot be displayed"))
(setq displayed-month month
displayed-year year)
(erase-buffer)
(calendar-increment-month month year -1)
(dotimes (i 3)
(calendar-generate-month month year
(+ calendar-left-margin
(* calendar-month-width i)))
(calendar-increment-month month year 1)))
यहां, (dotimes (i 3) ...)
एक पंक्ति में 3 महीने उत्पन्न करते हैं।
तो यदि आप 1 से अधिक पंक्तियों में 3 से अधिक महीने उत्पन्न करना चाहते हैं, तो आपको अपने द्वारा calendar-generate
फ़ंक्शन को ओवरराइड करना होगा, जैसा कि @Luke ने कहा था।
स्रोत
2015-06-29 04:29:46
आपको 2012 के रूप में साल में कड़ी मेहनत की गई प्रतीत होती है? ऐसा कुछ बेहतर हो सकता है: '(स्ट्रिंग-टू-नंबर (प्रारूप-समय-स्ट्रिंग"% वाई "(वर्तमान समय))) – phils
हां, संपादित करने के लिए स्वतंत्र महसूस करें। –