Lines Matching refs:dateString
502 static double parseDateFromNullTerminatedCharacters(const char* dateString, bool& haveTZ, int& offset)
522 skipSpacesAndComments(dateString);
525 const char *wordStart = dateString;
527 while (*dateString && !isASCIIDigit(*dateString)) {
528 if (isASCIISpace(*dateString) || *dateString == '(') {
529 if (dateString - wordStart >= 3)
531 skipSpacesAndComments(dateString);
532 wordStart = dateString;
534 dateString++;
538 if (month == -1 && wordStart != dateString)
541 skipSpacesAndComments(dateString);
543 if (!*dateString)
549 if (!parseLong(dateString, &newPosStr, 10, &day))
551 dateString = newPosStr;
553 if (!*dateString)
562 if (*dateString != '/')
565 if (!*++dateString)
570 if (!parseLong(dateString, &newPosStr, 10, &month))
573 dateString = newPosStr;
574 if (*dateString++ != '/' || !*dateString)
576 if (!parseLong(dateString, &newPosStr, 10, &day))
578 dateString = newPosStr;
579 } else if (*dateString == '/' && month == -1) {
580 dateString++;
583 if (!parseLong(dateString, &newPosStr, 10, &day))
587 dateString = newPosStr;
588 if (*dateString == '/')
589 dateString++;
590 if (!*dateString)
593 if (*dateString == '-')
594 dateString++;
596 skipSpacesAndComments(dateString);
598 if (*dateString == ',')
599 dateString++;
602 month = findMonth(dateString);
606 while (*dateString && *dateString != '-' && *dateString != ',' && !isASCIISpace(*dateString))
607 dateString++;
609 if (!*dateString)
613 if (*dateString != '-' && *dateString != '/' && *dateString != ',' && !isASCIISpace(*dateString))
615 dateString++;
623 if (year <= 0 && *dateString) {
624 if (!parseInt(dateString, &newPosStr, 10, &year))
633 dateString = newPosStr;
643 dateString = ++newPosStr;
644 skipSpacesAndComments(dateString);
647 parseLong(dateString, &newPosStr, 10, &hour);
653 if (newPosStr != dateString) {
654 dateString = newPosStr;
659 if (!*dateString)
663 if (*dateString++ != ':')
666 if (!parseLong(dateString, &newPosStr, 10, &minute))
668 dateString = newPosStr;
674 if (*dateString && *dateString != ':' && !isASCIISpace(*dateString))
678 if (*dateString ==':') {
679 dateString++;
681 if (!parseLong(dateString, &newPosStr, 10, &second))
683 dateString = newPosStr;
689 skipSpacesAndComments(dateString);
691 if (strncasecmp(dateString, "AM", 2) == 0) {
696 dateString += 2;
697 skipSpacesAndComments(dateString);
698 } else if (strncasecmp(dateString, "PM", 2) == 0) {
703 dateString += 2;
704 skipSpacesAndComments(dateString);
710 if (isASCIIDigit(*dateString) && year == -1) {
711 if (!parseInt(dateString, &newPosStr, 10, &year))
713 dateString = newPosStr;
714 skipSpacesAndComments(dateString);
719 if (*dateString) {
720 if (strncasecmp(dateString, "GMT", 3) == 0 || strncasecmp(dateString, "UTC", 3) == 0) {
721 dateString += 3;
725 if (*dateString == '+' || *dateString == '-') {
727 if (!parseInt(dateString, &newPosStr, 10, &o))
729 dateString = newPosStr;
736 if (*dateString != ':') {
742 ++dateString; // skip the ':'
744 if (!parseInt(dateString, &newPosStr, 10, &o2))
746 dateString = newPosStr;
752 if (0 == strncasecmp(dateString, known_zones[i].tzName, strlen(known_zones[i].tzName))) {
754 dateString += strlen(known_zones[i].tzName);
762 skipSpacesAndComments(dateString);
764 if (*dateString && year == -1) {
765 if (!parseInt(dateString, &newPosStr, 10, &year))
767 dateString = newPosStr;
768 skipSpacesAndComments(dateString);
772 if (*dateString)
786 double parseDateFromNullTerminatedCharacters(const char* dateString)
790 double ms = parseDateFromNullTerminatedCharacters(dateString, haveTZ, offset);