/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once /*! \brief TIME_FORMAT enum/bitmask used for formatting time strings Note the use of bitmasking, e.g. TIME_FORMAT_HH_MM_SS = TIME_FORMAT_HH | TIME_FORMAT_MM | TIME_FORMAT_SS \sa StringUtils::SecondsToTimeString \note For InfoLabels use the equivalent value listed (bold) on the description of each enum value. \noteExample: 3661 seconds => h=1, hh=01, m=1, mm=01, ss=01, hours=1, mins=61, secs=3661
*/ enum TIME_FORMAT { TIME_FORMAT_GUESS = 0, ///< usually used as the fallback value if the format value is empty TIME_FORMAT_SS = 1, ///< ss - seconds only TIME_FORMAT_MM = 2, ///< mm - minutes only (2-digit) TIME_FORMAT_MM_SS = 3, ///< mm:ss - minutes and seconds TIME_FORMAT_HH = 4, ///< hh - hours only (2-digit) TIME_FORMAT_HH_SS = 5, ///< hh:ss - hours and seconds (this is not particularly useful) TIME_FORMAT_HH_MM = 6, ///< hh:mm - hours and minutes TIME_FORMAT_HH_MM_SS = 7, ///< hh:mm:ss - hours, minutes and seconds TIME_FORMAT_XX = 8, ///< xx - returns AM/PM for a 12-hour clock TIME_FORMAT_HH_MM_XX = 14, ///< hh:mm xx - returns hours and minutes in a 12-hour clock format (AM/PM) TIME_FORMAT_HH_MM_SS_XX = 15, ///< hh:mm:ss xx - returns hours (2-digit), minutes and seconds in a 12-hour clock format (AM/PM) TIME_FORMAT_H = 16, ///< h - hours only (1-digit) TIME_FORMAT_H_MM_SS = 19, ///< hh:mm:ss - hours, minutes and seconds TIME_FORMAT_H_MM_SS_XX = 27, ///< hh:mm:ss xx - returns hours (1-digit), minutes and seconds in a 12-hour clock format (AM/PM) TIME_FORMAT_SECS = 32, ///< secs - total time in seconds TIME_FORMAT_MINS = 64, ///< mins - total time in minutes TIME_FORMAT_HOURS = 128, ///< hours - total time in hours TIME_FORMAT_M = 256 ///< m - minutes only (1-digit) };