in the titan skin myrecordedtv.xml #TV.RecordedTv.Time is used in several places to display the date and time of a recorded file.
The value display is not formatted correctly according to culture. Util.GetShortDayString has hardcoded the date portion of the string to always display day then month normal for your side of the pond but in the states we're used to month then day so Fri 11-3 for me is the 3rd day of November, not the 11th day of March.
I'm just not sure how to tell which countries use which format. maybe using dt.toString(GUILocatizeStrings.get(xxx)) would solve it where GUILocatizeStrings.get(xxx) returns ddd MM-dd for some of us and ddd dd-MM for the rest. in any case it almost does away with the need for getshortdaystring. is there a base Strings file that all Strings files inherit?
it would be nice to have Strings.xml that contained strings common to all languages that are overridden by the individual Strings-en-US.xml files.
could then be included in the base strings file and only the us file would need to be changed to the MM-dd format.
The value display is not formatted correctly according to culture. Util.GetShortDayString has hardcoded the date portion of the string to always display day then month normal for your side of the pond but in the states we're used to month then day so Fri 11-3 for me is the 3rd day of November, not the 11th day of March.
Code:
public static string GetShortDayString(DateTime dt)
{
try
{
string day;
switch (dt.DayOfWeek)
{
case DayOfWeek.Monday:
day = GUILocalizeStrings.Get(657);
break;
case DayOfWeek.Tuesday:
day = GUILocalizeStrings.Get(658);
break;
case DayOfWeek.Wednesday:
day = GUILocalizeStrings.Get(659);
break;
case DayOfWeek.Thursday:
day = GUILocalizeStrings.Get(660);
break;
case DayOfWeek.Friday:
day = GUILocalizeStrings.Get(661);
break;
case DayOfWeek.Saturday:
day = GUILocalizeStrings.Get(662);
break;
default:
day = GUILocalizeStrings.Get(663);
break;
}
return String.Format("{0} {1}-{2}", day, dt.Day, dt.Month);
}
Code:
return dt.tostring("ddd MM-dd")
or
return dt.tostring("ddd dd-MM")
Code:
in strings-en-us.xml added....
<String id="20000">ddd MM-dd</String>
<String id="20001">MM-dd<string>
is various locations updated formatted date settings to be
program.StartTime.ToString(GuiLocalizeStrings.get(20000)) // to replace getshortdaystring
and
program.StartTime.Tostring(GuiLocalizeStrings.get(20001)) // to replace .tostring("dd-MM")
I'm just not sure how to tell which countries use which format. maybe using dt.toString(GUILocatizeStrings.get(xxx)) would solve it where GUILocatizeStrings.get(xxx) returns ddd MM-dd for some of us and ddd dd-MM for the rest. in any case it almost does away with the need for getshortdaystring. is there a base Strings file that all Strings files inherit?
it would be nice to have Strings.xml that contained strings common to all languages that are overridden by the individual Strings-en-US.xml files.
Code:
<String id="20000">ddd dd-MM</String>
<String id="20001">dd-MM</String>
Last edited: