[REQUEST] System.Day, System.Month & System.Year
#1
Image

I'm currently coding this Time & Date panel and, even though it's possible, it's using a silly amount of visible/substring conditions which could all be avoided if we had more info labels for the date.

ie

System.Day - current day (Mon, Tue, etc)
System.DayDate - current day date (1, 2 ,etc)
System.Month - current month (Jan, Feb, etc)
System.Year - current year

Even better would be the option to use the long labels for Day and Month again.

ie

System.DayLong
System.MonthLong

Thanks.

EDIT: While I'm at it System.12hour would be great as well - returns AM, PM or empty if it the clock is 24hour.
Reply
#2
I second this! Here's how much code I have to separate the Month and day:

PASTEBIN
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#3
that's a lot of date related infolabels - I think that System.Date(xx) could do (from organisational view as functionality would be same) - noted on to-do list
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#4
Agreed but even the following would be more than welcome and still cut down on the amount of code I'm currently using and get rid of all the SubString compares.

System.Date(dd)
System.Date(mm)
System.Date(yyyy)

Thanks.
Reply
#5
Check wiki http://wiki.xbmc.org/index.php?title=InfoLabels to get updates on System.Time and System.Date (You will need nightly from 30 Aug)
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#6
Legend, thanks.

And here's the new stuff -

System.Time(format)

Shows hours (hh), minutes (mm) or seconds (ss). When 12 hour clock is used (xx) will return AM/PM. Also supported: (hh:mm), (mmConfuseds), (hh:mmConfuseds), (hh:mmConfuseds). (xx) option added after dharma


System.Date(format)

Show current date using format, available markings: d (day of month 1-31), dd (day of month 01-31), ddd (short day of the week Mon-Sun), DDD (long day of the week Monday-Sunday), m (month 1-12), mm (month 01-12), mmm (short month name Jan-Dec), MMM (long month name January-December), yy (2-digit year), yyyy (4-digit year). Added after dharma.
Reply
#7
Awesome, this is a very welcome improvement.

You might want to close this one then: http://trac.xbmc.org/ticket/4716 Smile
Reply
#8
Can you share your final clock code ?
It's amazingly clean and neat
Reply

Logout Mark Read Team Forum Stats Members Help
[REQUEST] System.Day, System.Month & System.Year0