Compare commits
2 commits
f16f49dde7
...
9c2e5ca79c
Author | SHA1 | Date | |
---|---|---|---|
9c2e5ca79c | |||
05118ba453 |
2 changed files with 30 additions and 0 deletions
|
@ -1,2 +1,6 @@
|
|||
HP_ENV=
|
||||
HP_URL=
|
||||
MICROCMS_SERVICE_DOMAIN=
|
||||
MICROCMS_API_KEY=
|
||||
CLOUDFLARE_ZONE_ID=
|
||||
CLOUDFLARE_API_KEY=
|
||||
|
|
26
src/lib/time.lisp
Normal file
26
src/lib/time.lisp
Normal file
|
@ -0,0 +1,26 @@
|
|||
(defpackage #:hp/lib/time
|
||||
(:use #:cl)
|
||||
(:import-from #:local-time
|
||||
#:reread-timezone-repository
|
||||
#:find-timezone-by-location-name
|
||||
#:parse-timestring
|
||||
#:format-timestring)
|
||||
(:export #:datetime
|
||||
#:jp-datetime))
|
||||
(in-package #:hp/lib/time)
|
||||
|
||||
(reread-timezone-repository)
|
||||
(setf local-time:*default-timezone*
|
||||
(find-timezone-by-location-name "Asia/Tokyo"))
|
||||
|
||||
(defun datetime (timestring)
|
||||
(format-timestring nil
|
||||
(parse-timestring timestring)
|
||||
:format '(:year "-" (:month 2) "-" (:day 2) " "
|
||||
(:hour 2) ":" (:min 2))))
|
||||
|
||||
(defun jp-datetime (timestring)
|
||||
(format-timestring nil
|
||||
(parse-timestring timestring)
|
||||
:format '(:year "年" :month "月" :day "日" " "
|
||||
:hour "時" :min "分")))
|
Loading…
Add table
Add a link
Reference in a new issue