Get current month
Get current month
Hi all,
Sorry but I can't get current month .
How can I do it?
Thanks,
bye
Sorry but I can't get current month .
How can I do it?
Thanks,
bye
Re: Get current month
I'm thinking you're going to want at least two of these functions:Stiv wrote:Hi all,
Sorry but I can't get current month .
How can I do it?
Thanks,
bye
Code: Select all
multiple-value-bind
decode-universal-time
get-universal-time
"If you want to improve, be content to be thought foolish and stupid." -Epictetus
Re: Get current month
Thanks very much,
I've done so:
but it generates many style-warning, how can I improve it?
Thanks,
Bye
I've done so:
Code: Select all
(multiple-value-bind (s min b gg m a b2 b3 b4)
(decode-universal-time (get-universal-time))
(list m))
Thanks,
Bye
-
- Posts: 406
- Joined: Sat Mar 07, 2009 6:17 pm
- Location: Brazil
- Contact:
Re: Get current month
Try this:
Code: Select all
(multiple-value-bind (s min b gg m a b2 b3 b4)
(decode-universal-time (get-universal-time))
(declare (ignore s min b gg a b2 b3 b4))
(list m))
Re: Get current month
A 1-liner:
Code: Select all
(fifth (multiple-value-list (decode-universal-time (get-universal-time))))
-
- Posts: 117
- Joined: Tue Aug 10, 2010 11:24 pm
- Location: Calgary, Alberta
- Contact:
Re: Get current month
Another 1-liner =)
Code: Select all
(nth-value 4 (decode-universal-time (get-universal-time)))
Need an online wiki database? My Lisp startup http://www.formlis.com combines a wiki with forms and reports.