OSDN Git Service

Update version number to 1.2.1.0
[tortoisegit/TortoiseGitJp.git] / src / TortoiseGitBlame / TortoiseGitBlameAppUtils.h
index ca38bac..323942e 100644 (file)
@@ -30,12 +30,28 @@ public:
        /**\r
         * FUNCTION    :   FormatDateAndTime\r
         * DESCRIPTION :   Generates a displayable string from a CTime object in\r
-        *                 system short or long format dependant on setting of option\r
-        *                                 as DATE_SHORTDATE or DATE_LONGDATE. bIncludeTime (optional) includes time.\r
+        *                 system short or long format  or as a relative value\r
+        *                                 cTime - the time\r
+        *                                 option - DATE_SHORTDATE or DATE_LONGDATE\r
+        *                                 bIncluedeTime - whether to show time as well as date\r
+        *                                 bRelative - if true then relative time is shown if reasonable \r
+        *                                 If HKCU\Software\TortoiseGit\UseSystemLocaleForDates is 0 then use fixed format\r
+        *                                 rather than locale\r
         * RETURN      :   CString containing date/time\r
         */\r
-       static CString FormatDateAndTime( const CTime& cTime, DWORD option, bool bIncludeTime=true );\r
+       static CString FormatDateAndTime( const CTime& cTime, DWORD option, bool bIncludeTime=true,\r
+               bool bRelative=false );\r
+       /**\r
+        *      Converts a given time to a relative display string (relative to current time)\r
+        *      Given time must be in local timezone\r
+        */\r
+       static CString ToRelativeTimeString(CTime time);\r
 \r
        \r
 private:\r
+       /**\r
+        *      Generates a display string showing the relative time between the two given times as COleDateTimes\r
+        */\r
+       static CString ToRelativeTimeString(COleDateTime time,COleDateTime RelativeTo);\r
+       static CString ExpandRelativeTime( int count, UINT format_1, UINT format_n );\r
 };\r