* @brief Match a day or month name against a list of values and set the required value * @param ptr Current string position * @param value On success, contains index of matched string * @isoNames Array of values * @nameCount Number of names in array * @retval bool false on failure * * Names are compared without case-sensitivity */
| 53 | * Names are compared without case-sensitivity |
| 54 | */ |
| 55 | bool matchName(const char*& ptr, uint8_t& value, const FourDigitName isoNames[], unsigned nameCount) |
| 56 | { |
| 57 | FourDigitName name{{ptr[0], ptr[1], ptr[2]}}; |
| 58 | for(unsigned i = 0; i < nameCount; ++i) { |
| 59 | if(isoNames[i] == name) { |
| 60 | value = i; |
| 61 | ptr += 3; |
| 62 | return true; |
| 63 | } |
| 64 | } |
| 65 | return false; |
| 66 | } |
| 67 | |
| 68 | bool isLeapCentury(uint16_t year) |
| 69 | { |