diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-11-12 08:21:20 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-11-13 12:06:30 +0100 |
commit | bad2196674764d67f19b276c1f6327dc3394e01a (patch) | |
tree | 8aaf3c4c05714f0474b4e8fb71e97a55ed6730fb /unotools | |
parent | 6a23a02b2bd65a6c3db4beb7fc083528f0a006c5 (diff) |
Use shared methods instead of duplicated code
Change-Id: I42836dcd1ef3f95d90e6e8897efff9cab7cc23fd
Reviewed-on: https://gerrit.libreoffice.org/63276
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/misc/datetime.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index 979db79e13cd..3c2da9f6586e 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -212,6 +212,15 @@ OUString GetDateTimeString(const css::util::DateTime& _rDT) return rLoDa.getDate(aDT) + " " + rLoDa.getTime(aDT); } +OUString GetDateTimeString(sal_Int32 _nDate, sal_Int32 _nTime) +{ + const LocaleDataWrapper& rLoDa = GetLocaleData(); + + Date aDate(_nDate); + tools::Time aTime(_nTime * tools::Time::nanoPerCenti); + return rLoDa.getDate(aDate) + ", " + rLoDa.getTime(aTime); +} + OUString GetDateString(const css::util::DateTime& _rDT) { return GetLocaleData().getDate(GetDateTime(_rDT)); |