| SexScripts : Day of the Week - https://ss.deviatenow.com:443/viewtopic.php?f=4&t=395 | Page 1 of 1 |
Day of the Week |
martlb [ Thu Mar 27, 2014 11:57 pm ] |
|---|---|
Day of the week With the following command you get the numerical day of the month: def text = Calendar.getInstance().get(Calendar.YEAR)+"-"+ Calendar.getInstance().get(Calendar.MONTH)+"-"+ Calendar.getInstance().get(Calendar.DAY_OF_MONTH)+" "+ Calendar.getInstance().get(Calendar.HOUR_OF_DAY)+":"+ Calendar.getInstance().get(Calendar.MINUTE)+":"+ Calendar.getInstance().get(Calendar.SECOND)); show(text) But how to determine the Day of the Week? I would like to have something like this: switch(Day) { case Monday: .... ; break case Tuesday: .... ; break case Wednesday: .... ; break case Thursday: .... ; break case Friday: .... ; break case Saturday: .... ; break case Sunday: .... ; break } Thanks in advance. |
|
Re: Day of the Week |
doti [ Sat Mar 29, 2014 12:20 pm ] |
|---|---|
Related to this previous subject : it's another constant from Calendar Code: def number = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) I think it's 1=sunday, 2=monday, etc., but not sure |
|
Re: Day of the Week |
martlb [ Sat Mar 29, 2014 8:23 pm ] |
|---|---|
Sometimes it's amazing, it is that simple! Thanks! |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |