PDA

View Full Version : Showing the clock and date in skin



markus625
18-01-13, 16:19
Guys thought it was about time we showed what different formats we can use to show the date/time etc in our skins and to help new skinner's out there.

First the widget:



<widget source="global.CurrentTime" render="Label" position="10,10" size="180,30">
<convert type="ClockToText">see below</convert>
</widget>


Then the different formats show below for today's date Fri 18 January 2013 time 14:11 and 15 seconds.

Default = 14:11
Date = Friday 18 January 2013
ShortDate = Fri 18/01
Full = Fri 18/01 14:11
Format:%a %d/%m/%y = Fri 18/01/13
Format:%A = Friday
Format:%H:%M = 14:11
Format:%S = 15 (seconds)
Format:%h = Jan
Format:%D = 01/18/13
Format:%Y = 2013
Format:%d/%m = 18/01
Format:%B = January
Format=%Z = GMT (time-zone)

Below should show the time in the 12 hour clock format %I and the AM/PM represented by %p and also adding a # sign after the % sign should cancel out the leading zero but doesn't, also the %p or %P doesn't show AM or PM any chance Andy could implement this in the image.

The below format should be showing 2:11 PM
Format:%#I:%M %p = 02:11

Larry-G
18-01-13, 16:25
Good idea, should help those who want to get involved but dont know where to start.

markus625
18-01-13, 16:35
Have a look here for the different formats,
http://docs.rainmeter.net/manual/measures/time

Just want to figure out how to show the time in am/pm like 2:14 pm etc etc.

s31teg
20-01-13, 11:01
this is great, when im back im going to see if this works on the VFD of my ultimo!

s31teg
20-01-13, 19:13
update, i have managed to update the time on the VFD on the standby screen dont know how to for when the screen in use

here is what i have changed, any help appreciated!!


<widget source="global.CurrentTime" render="Label" position="0,22" size="120,45" font="FdLcD;46" halign="left" noWrap="1"> <convert type="ClockToText">Format:%#I:%M %p</convert>
</widget>

markus625
20-01-13, 19:30
update, i have managed to update the time on the VFD on the standby screen dont know how to for when the screen in use

here is what i have changed, any help appreciated!!


<widget source="global.CurrentTime" render="Label" position="0,22" size="120,45" font="FdLcD;46" halign="left" noWrap="1"> <convert type="ClockToText">Format:%#I:%M %p</convert>
</widget>

Sorry mate not sure i can help you on that.

But with the code i know so far that the #I is supposed to cancel out the leading zero which it doesnt at present and the %p is supposed to output the am/pm.

digidude
20-01-13, 20:03
dont know if this will be of any help, but it explains everything used in the linux date command, and what exactly it does

It can be the combination of any one of the following:

%%-a literal %
%a-locale's abbreviated weekday name (e.g., Sun)
%A-locale's full weekday name (e.g., Sunday)
%b-locale's abbreviated month name (e.g., Jan)
%B-locale's full month name (e.g., January)
%c-locale's date and time (e.g., Thu Mar 3 23:05:25 2005)
%C-century; like %Y, except omit last two digits (e.g., 21)
%d-day of month (e.g, 01)
%D-date; same as %m/%d/%y
%e-day of month, space padded; same as %_d
%F-full date; same as %Y-%m-%d
%g-last two digits of year of ISO week number (see %G)
%G- year of ISO week number (see %V); normally useful only with %V
%h-same as %b
%H-hour (00..23)
%I-hour (01..12)
%j-day of year (001..366)
%k- hour ( 0..23)
%l- hour ( 1..12)
%m-month (01..12)
%M-minute (00..59)
%n- a newline
%N- nanoseconds (000000000..999999999)
%p-locale's equivalent of either AM or PM; blank if not known
%P-like %p, but lower case
%r- locale's 12-hour clock time (e.g., 11:11:04 PM)
%R- 24-hour hour and minute; same as %H:%M
%s- seconds since 1970-01-01 00:00:00 UTC
%S-second (00..60)
%t- a tab
%T- time; same as %H:%M:%S
%u-day of week (1..7); 1 is Monday
%U-week number of year, with Sunday as first day of week (00..53)
%V- ISO week number, with Monday as first day of week (01..53)
%w-day of week (0..6); 0 is Sunday
%W-week number of year, with Monday as first day of week (00..53)
%x-locale's date representation (e.g., 12/31/99)
%X-locale's time representation (e.g., 23:13:48)
%y- last two digits of year (00..99)
%Y-year
%z-+hhmm numeric timezone (e.g., -0400)
%:z-+hh:mm numeric timezone (e.g., -04:00)
%::z-+hh:mm:ss numeric time zone (e.g., -04:00:00)
%:::z-numeric time zone with : to necessary precision (e.g., -04, +05:30)
%Z-alphabetic time zone abbreviation (e.g., EDT)



The below format should be showing 2:11 PM
Format:%#I:%M %p = 02:11

from the above, should be

Format:%l:%M:%p

digidude
20-01-13, 20:17
tried to edit my post, but it seems to be going a little wierd lol

Format:%l:%M:%p

lower case L, not an upper case I for the first one, should sort it out m8

s31teg
20-01-13, 23:14
tried to edit my post, but it seems to be going a little wierd lol

Format:%l:%M:%p

lower case L, not an upper case I for the first one, should sort it out m8

i have changed the code and still the same, shows 12 hour on the standy vfd without AM/PM


also i dont know how to change it when the box not in standby as that time is still in 24hour.. it seems that line only effects standby and not global format

digidude
21-01-13, 08:49
ive tried this morning with %p %P and %r, and none of them show the am/pm prefix. A lot of things on linux receivers use 'cut back' versions of the full linux commands, mainly to save space, and it looks like this may be one of those things

%l:%M %a %d

will show as

7:49 Mon 21

s31teg
21-01-13, 11:22
to be honest im not that bothered about AM/PM

did your changes update the clock when the box is on... (the little one bottom right)?

markus625
21-01-13, 11:36
ive tried this morning with %p %P and %r, and none of them show the am/pm prefix. A lot of things on linux receivers use 'cut back' versions of the full linux commands, mainly to save space, and it looks like this may be one of those things

%l:%M %a %d

will show as

7:49 Mon 21

Cheers digidude at least we can use a 12-hour clock now in are skins, thanks or all the info. :)

markus625
21-01-13, 15:44
Ah tried upercase and lowercase L but this still shows the 24 hour clock

digidude
21-01-13, 15:56
when my receivers in standby, it works without the leading 0



<screen name="StandbySummary" position="0,0" size="132,64">
<widget source="global.CurrentTime" render="Label" position="0,0" size="120,64" font="Regular;48" halign="center" valign="center">
<convert type="ClockToText">Format:%l:%M %a %d</convert>

markus625
21-01-13, 16:01
when my receivers in standby, it works without the leading 0



<screen name="StandbySummary" position="0,0" size="132,64">
<widget source="global.CurrentTime" render="Label" position="0,0" size="120,64" font="Regular;48" halign="center" valign="center">
<convert type="ClockToText">Format:%l:%M %a %d</convert>


Ive tried the above %l in the quickepg screen but it shows up in 24 hour.

IAmATeaf
23-01-13, 12:44
Open ended question but I'm wondering if there are any guides or docs that detail what parameters can be used by certain call and dialogs. What I mean by this is for example the ChannelSelection or EPG screens make use of the "list" object to populate the displayed dialog, I'd like to know what parameters are valid so for example forgroundColor, backgroundColour etc....

markus625
23-01-13, 12:51
Open ended question but I'm wondering if there are any guides or docs that detail what parameters can be used by certain call and dialogs. What I mean by this is for example the ChannelSelection or EPG screens make use of the "list" object to populate the displayed dialog, I'd like to know what parameters are valid so for example forgroundColor, backgroundColour etc....

Wouldnt mind my self knowing that, im sure Andy would be able to list them.

judge
23-01-13, 12:54
Open ended question but I'm wondering if there are any guides or docs that detail what parameters can be used by certain call and dialogs. What I mean by this is for example the ChannelSelection or EPG screens make use of the "list" object to populate the displayed dialog, I'd like to know what parameters are valid so for example forgroundColor, backgroundColour etc....

asked this myself recently...

ServiceFont
EntryFontGraphical
EntryFontAlignment
EventFontSingle
EventFontInfobar
ServiceForegroundColor
ServiceForegroundColorNow
ServiceBackgroundColor
ServiceBackgroundColorNow
EntryForegroundColor
EntryForegroundColorSelected
EntryBackgroundColor
EntryBackgroundColorSelected
EntryBackgroundColorNow
EntryBackgroundColorNowSelected
EntryForegroundColorNow
EntryForegroundColorNowSelected
ServiceBorderColor
ServiceBorderWidth
ServiceNamePadding
EntryBorderColor
EventBorderWidth
EventNamePadding
RecordForegroundColor
RecordForegroundColorSelected
RecordBackgroundColor
RecordBackgroundColorSelected
ZapForegroundColor
ZapBackgroundColor
ZapForegroundColorSelected
ZapBackgroundColorSelected

markus625
23-01-13, 12:56
asked this myself recently...

ServiceFont
EntryFontGraphical
EntryFontAlignment
EventFontSingle
EventFontInfobar
ServiceForegroundColor
ServiceForegroundColorNow
ServiceBackgroundColor
ServiceBackgroundColorNow
EntryForegroundColor
EntryForegroundColorSelected
EntryBackgroundColor
EntryBackgroundColorSelected
EntryBackgroundColorNow
EntryBackgroundColorNowSelected
EntryForegroundColorNow
EntryForegroundColorNowSelected
ServiceBorderColor
ServiceBorderWidth
ServiceNamePadding
EntryBorderColor
EventBorderWidth
EventNamePadding
RecordForegroundColor
RecordForegroundColorSelected
RecordBackgroundColor
RecordBackgroundColorSelected
ZapForegroundColor
ZapBackgroundColor
ZapForegroundColorSelected
ZapBackgroundColorSelected

Do they all work thru, of you have the epg folder with png's in does the code above still apply and most importantly do they apply to all lists.

judge
23-01-13, 13:02
Do they all work thru, of you have the epg folder with png's in does the code above still apply and most importantly do they apply to all lists.

any of the ones I tried worked.
i'm sure if Andy gets a bit of time, he could list or explain many more...

IAmATeaf
24-01-13, 18:05
judge, thanks that's exactly the type of info I was after.

markus625
21-11-15, 13:58
Can we make this a sticky thread as its a good reference guide.