Lines Matching defs:skeleton

76 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
78 return createInstance(skeleton, Locale::getDefault(), status);
83 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
90 skeleton.extract(0, skeleton.length(), result, "UTF-8");
94 sprintf(mesg, "skeleton: %s; pattern: %s\n", result, result_1);
99 return create(locale, dtitvinf, &skeleton, status);
105 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
108 return createInstance(skeleton, Locale::getDefault(), dtitvinf, status);
113 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
118 return create(locale, ptn, &skeleton, status);
504 const UnicodeString* skeleton,
517 DateFormat::createInstanceForSkeleton(*skeleton, locale, status)), status);
522 if ( skeleton ) {
523 fSkeleton = *skeleton;
537 const UnicodeString* skeleton,
540 skeleton, status);
563 * For example, it has interval patterns on skeleton "dMy" and "hm",
564 * but it does not have interval patterns on skeleton "dMyhm".
566 * The rule to genearte interval patterns for both date and time skeleton are
582 * For example, a pattern/skeleton is "hm", but the interval pattern
606 // or by createInstance(UnicodeString skeleton, .... )
620 /* Check whether the skeleton is a combination of date and time.
629 /* the difference between time skeleton and normalizedTimeSkeleton are:
630 * 1. (Formerly, normalized time skeleton folded 'H' to 'h'; no longer true)
631 * 2. 'a' is omitted in normalized time skeleton.
633 * time skeleton
635 * The difference between date skeleton and normalizedDateSkeleton are:
706 } // end of skeleton not found
707 // interval patterns for skeleton are found in resource
737 UnicodeString skeleton = fSkeleton;
739 // prefix skeleton with 'd'
740 skeleton.insert(0, LOW_D);
741 setFallbackPattern(UCAL_DATE, skeleton, status);
744 // then prefix skeleton with 'M'
745 skeleton.insert(0, CAP_M);
746 setFallbackPattern(UCAL_MONTH, skeleton, status);
749 // then prefix skeleton with 'y'
750 skeleton.insert(0, LOW_Y);
751 setFallbackPattern(UCAL_YEAR, skeleton, status);
776 DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton,
794 for (i = 0; i < skeleton.length(); ++i) {
795 UChar ch = skeleton[i];
932 * 2. there might be no pattern for 'y' differ for skeleton "Md",
934 * need to look for it from skeleton 'yMd'
936 * @param dateSkeleton normalized date skeleton
937 * @param timeSkeleton normalized time skeleton
938 * @return whether the resource is found for the skeleton.
939 * TRUE if interval pattern found for the skeleton,
947 const UnicodeString* skeleton;
948 // if both date and time skeleton present,
954 skeleton = &timeSkeleton;
956 skeleton = &dateSkeleton;
959 /* interval patterns for skeleton "dMMMy" (but not "dMMMMy")
961 * interval patterns for skeleton "dMMMMy" are calculated by
962 * 1. get the best match skeleton for "dMMMMy", which is "dMMMy"
967 // best skeleton, and the difference information
969 const UnicodeString* bestSkeleton = fInfo->getBestSkeleton(*skeleton,
971 /* best skeleton could be NULL.
978 and the best skeleton match could be NULL
999 // 0 means the best matched skeleton is the same as input skeleton
1003 // (this will happen, for instance, if the supplied skeleton has seconds,
1006 // skeleton has different fields, not only v/z difference
1013 // only has date skeleton
1014 setIntervalPattern(UCAL_DATE, skeleton, bestSkeleton, differenceInfo,
1017 UBool extended = setIntervalPattern(UCAL_MONTH, skeleton, bestSkeleton,
1023 skeleton = &extendedSkeleton;
1025 setIntervalPattern(UCAL_YEAR, skeleton, bestSkeleton, differenceInfo,
1028 setIntervalPattern(UCAL_MINUTE, skeleton, bestSkeleton, differenceInfo);
1029 setIntervalPattern(UCAL_HOUR, skeleton, bestSkeleton, differenceInfo);
1030 setIntervalPattern(UCAL_AM_PM, skeleton, bestSkeleton, differenceInfo);
1039 const UnicodeString& skeleton,
1045 fLocale, skeleton, status);
1132 * but also return the extended skeleton and its best match skeleton.
1135 * @param skeleton skeleton
1136 * @param bestSkeleton the best match skeleton which has interval pattern
1138 * @param differenceInfo the difference between skeleton and best skeleton
1139 * 0 means the best matched skeleton is the same as input skeleton
1144 * @param extendedSkeleton extended skeleton
1145 * @param extendedBestSkeleton extended best match skeleton
1147 * through extending skeleton or not.
1149 * extending skeleton, FALSE otherwise.
1154 const UnicodeString* skeleton,
1181 // else, looking for pattern when 'y' differ for 'dMMMM' skeleton,
1183 // since there is no pattern for 'y' differs for skeleton 'MMMd',
1184 // need to look for it from skeleton 'yMMMd',
1189 *extendedSkeleton = *skeleton;
1194 // skeleton "MMMM".
1197 // if there is no skeleton "yMMMM" defined,
1198 // look for the best match skeleton, for example: "yMMM"
1211 adjustFieldWidth(*skeleton, *bestSkeleton, pattern, differenceInfo,
1395 const UnicodeString& skeleton)
1398 return ( (skeleton.indexOf(fieldChar) == -1)?FALSE:TRUE ) ;
1456 // there is no "L" (always be "M") in skeleton,
1458 // for skeleton "M+", the pattern might be "...L..."
1495 // there is no "L" (always be "M") in skeleton,
1497 // for skeleton "M+", the pattern might be "...L..."