[mythtv] [PATCH] standard international date format
Craig Rindy
developstuff at qwest.net
Sun Jan 4 12:57:16 EST 2004
The attached small patch adds the international date format (ISO 8601 standard) to the long and short date format settings in "Setup"->"Appearance"->"Localization". I didn't feel so bold as to make them the default, but considering it's the world-wide standard, it might be a good idea to make it so. Isaac, please let me know if you'd like me to submit a new patch making the ISO date and/or time format the default for new databases. Note that ISO 8601 time format is currently a choice (the last item) but not the default. Writing that last sentence just reminded me to change the samptime in globalsettings.cpp to something with a single digit hour because you can't tell the difference between the last two choices in the GUI otherwise, so I've changed that in this patch as well.
--
Craig Rindy
-------------- next part --------------
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.122
diff -u -r1.122 globalsettings.cpp
--- programs/mythfrontend/globalsettings.cpp 31 Dec 2003 06:19:14 -0000 1.122
+++ programs/mythfrontend/globalsettings.cpp 4 Jan 2004 17:55:27 -0000
@@ -964,6 +964,7 @@
addSelection(sampdate.toString("MM.dd"), "MM.dd");
addSelection(sampdate.toString("ddd d MMM"), "ddd d MMM");
addSelection(sampdate.toString("dd.MM.yyyy"), "dd.MM.yyyy");
+ addSelection(sampdate.toString("yyyy-MM-dd"), "yyyy-MM-dd");
setHelpText(QObject::tr("Your preferred date format."));
};
};
@@ -983,6 +984,7 @@
addSelection(sampdate.toString("MM.dd"), "MM.dd");
addSelection(sampdate.toString("d.M."), "d.M.");
addSelection(sampdate.toString("dd.MM."), "dd.MM.");
+ addSelection(sampdate.toString("MM-dd"), "MM-dd");
setHelpText(QObject::tr("Your preferred short date format."));
};
};
@@ -993,7 +995,7 @@
GlobalSetting("TimeFormat") {
setLabel(QObject::tr("Time format"));
- QTime samptime(18, 56, 0);
+ QTime samptime(6, 56, 0);
addSelection(samptime.toString("h:mm AP"), "h:mm AP");
addSelection(samptime.toString("h:mm ap"), "h:mm ap");
More information about the mythtv-dev
mailing list