| | |
| | | return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2")); |
| | | } |
| | | |
| | | //详细显示 |
| | | //xx小时xx分XX秒 |
| | | //xx分XX秒 |
| | | //xx秒 |
| | | public static string SecondsToHMSEx(int _seconds) |
| | | { |
| | | int hours = _seconds % 86400 / 3600; |
| | | int mins = _seconds % 3600 / 60; |
| | | int seconds = _seconds % 60; |
| | | if (hours > 0) |
| | | { |
| | | return StringUtility.Contact(hours, Language.Get("L1072"), mins, Language.Get("L1073"), seconds, Language.Get("L1075")); |
| | | } |
| | | else if (mins > 0) |
| | | { |
| | | return StringUtility.Contact(mins, Language.Get("L1073"), seconds, Language.Get("L1075")); |
| | | } |
| | | else |
| | | { |
| | | return StringUtility.Contact(seconds, Language.Get("L1075")); |
| | | } |
| | | } |
| | | |
| | | |
| | | //例子;分:秒 |
| | | //xx:xx |
| | | public static string SecondsToMS(int _seconds) |
| | |
| | | } |
| | | return StringUtility.Contact(hours.ToString("D2"), ":", mins.ToString("D2"), ":", seconds.ToString("D2")); |
| | | } |
| | | |
| | | |
| | | //例子 |
| | | //x天 |
| | | //x时 |