Lines Matching defs:skeleton
69 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
71 return createInstance(skeleton, Locale::getDefault(), status);
76 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
83 skeleton.extract(0, skeleton.length(), result, "UTF-8");
87 sprintf(mesg, "skeleton: %s; pattern: %s\n", result, result_1);
92 return create(locale, dtitvinf, &skeleton, status);
98 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
101 return createInstance(skeleton, Locale::getDefault(), dtitvinf, status);
106 DateIntervalFormat::createInstance(const UnicodeString& skeleton,
111 return create(locale, ptn, &skeleton, status);
465 const UnicodeString* skeleton,
478 SimpleDateFormat* dtfmt = createSDFPatternInstance(*skeleton, locale,
494 if ( skeleton ) {
495 fSkeleton = *skeleton;
511 DateIntervalFormat::createSDFPatternInstance(const UnicodeString& skeleton,
520 const UnicodeString pattern = dtpng->getBestPattern(skeleton, status);
536 const UnicodeString* skeleton,
539 skeleton, status);
562 * For example, it has interval patterns on skeleton "dMy" and "hm",
563 * but it does not have interval patterns on skeleton "dMyhm".
565 * The rule to genearte interval patterns for both date and time skeleton are
581 * For example, a pattern/skeleton is "hm", but the interval pattern
605 // or by createInstance(UnicodeString skeleton, .... )
618 /* Check whether the skeleton is a combination of date and time.
627 /* the difference between time skeleton and normalizedTimeSkeleton are:
628 * 1. (Formerly, normalized time skeleton folded 'H' to 'h'; no longer true)
629 * 2. 'a' is omitted in normalized time skeleton.
631 * time skeleton
633 * The difference between date skeleton and normalizedDateSkeleton are:
679 } // end of skeleton not found
680 // interval patterns for skeleton are found in resource
709 UnicodeString skeleton = fSkeleton;
711 // prefix skeleton with 'd'
712 skeleton.insert(0, LOW_D);
713 setFallbackPattern(UCAL_DATE, skeleton, status);
716 // then prefix skeleton with 'M'
717 skeleton.insert(0, CAP_M);
718 setFallbackPattern(UCAL_MONTH, skeleton, status);
721 // then prefix skeleton with 'y'
722 skeleton.insert(0, LOW_Y);
723 setFallbackPattern(UCAL_YEAR, skeleton, status);
772 DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton,
790 for (i = 0; i < skeleton.length(); ++i) {
791 UChar ch = skeleton[i];
928 * 2. there might be no pattern for 'y' differ for skeleton "Md",
930 * need to look for it from skeleton 'yMd'
932 * @param dateSkeleton normalized date skeleton
933 * @param timeSkeleton normalized time skeleton
934 * @return whether the resource is found for the skeleton.
935 * TRUE if interval pattern found for the skeleton,
943 const UnicodeString* skeleton;
944 // if both date and time skeleton present,
950 skeleton = &timeSkeleton;
952 skeleton = &dateSkeleton;
955 /* interval patterns for skeleton "dMMMy" (but not "dMMMMy")
957 * interval patterns for skeleton "dMMMMy" are calculated by
958 * 1. get the best match skeleton for "dMMMMy", which is "dMMMy"
963 // best skeleton, and the difference information
965 const UnicodeString* bestSkeleton = fInfo->getBestSkeleton(*skeleton,
967 /* best skeleton could be NULL.
974 and the best skeleton match could be NULL
981 // 0 means the best matched skeleton is the same as input skeleton
986 // skeleton
993 // only has date skeleton
994 setIntervalPattern(UCAL_DATE, skeleton, bestSkeleton, differenceInfo,
997 UBool extended = setIntervalPattern(UCAL_MONTH, skeleton, bestSkeleton,
1003 skeleton = &extendedSkeleton;
1005 setIntervalPattern(UCAL_YEAR, skeleton, bestSkeleton, differenceInfo,
1008 setIntervalPattern(UCAL_MINUTE, skeleton, bestSkeleton, differenceInfo);
1009 setIntervalPattern(UCAL_HOUR, skeleton, bestSkeleton, differenceInfo);
1010 setIntervalPattern(UCAL_AM_PM, skeleton, bestSkeleton, differenceInfo);
1019 const UnicodeString& skeleton,
1024 UnicodeString pattern = fDtpng->getBestPattern(skeleton, status);
1111 * but also return the extended skeleton and its best match skeleton.
1114 * @param skeleton skeleton
1115 * @param bestSkeleton the best match skeleton which has interval pattern
1117 * @param differenceInfo the difference between skeleton and best skeleton
1118 * 0 means the best matched skeleton is the same as input skeleton
1123 * @param extendedSkeleton extended skeleton
1124 * @param extendedBestSkeleton extended best match skeleton
1126 * through extending skeleton or not.
1128 * extending skeleton, FALSE otherwise.
1133 const UnicodeString* skeleton,
1160 // else, looking for pattern when 'y' differ for 'dMMMM' skeleton,
1162 // since there is no pattern for 'y' differs for skeleton 'MMMd',
1163 // need to look for it from skeleton 'yMMMd',
1168 *extendedSkeleton = *skeleton;
1173 // skeleton "MMMM".
1176 // if there is no skeleton "yMMMM" defined,
1177 // look for the best match skeleton, for example: "yMMM"
1190 adjustFieldWidth(*skeleton, *bestSkeleton, pattern, differenceInfo,
1314 const UnicodeString& skeleton)
1317 return ( (skeleton.indexOf(fieldChar) == -1)?FALSE:TRUE ) ;
1375 // there is no "L" (always be "M") in skeleton,
1377 // for skeleton "M+", the pattern might be "...L..."
1414 // there is no "L" (always be "M") in skeleton,
1416 // for skeleton "M+", the pattern might be "...L..."