Home | History | Annotate | Download | only in i18n

Lines Matching refs: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,
517 skeleton, locale, *dtpng, status);
525 const UnicodeString* skeleton,
528 skeleton, status);
551 * For example, it has interval patterns on skeleton "dMy" and "hm",
552 * but it does not have interval patterns on skeleton "dMyhm".
554 * The rule to genearte interval patterns for both date and time skeleton are
570 * For example, a pattern/skeleton is "hm", but the interval pattern
594 // or by createInstance(UnicodeString skeleton, .... )
607 /* Check whether the skeleton is a combination of date and time.
616 /* the difference between time skeleton and normalizedTimeSkeleton are:
617 * 1. (Formerly, normalized time skeleton folded 'H' to 'h'; no longer true)
618 * 2. 'a' is omitted in normalized time skeleton.
620 * time skeleton
622 * The difference between date skeleton and normalizedDateSkeleton are:
668 } // end of skeleton not found
669 // interval patterns for skeleton are found in resource
698 UnicodeString skeleton = fSkeleton;
700 // prefix skeleton with 'd'
701 skeleton.insert(0, LOW_D);
702 setFallbackPattern(UCAL_DATE, skeleton, status);
705 // then prefix skeleton with 'M'
706 skeleton.insert(0, CAP_M);
707 setFallbackPattern(UCAL_MONTH, skeleton, status);
710 // then prefix skeleton with 'y'
711 skeleton.insert(0, LOW_Y);
712 setFallbackPattern(UCAL_YEAR, skeleton, status);
761 DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton,
779 for (i = 0; i < skeleton.length(); ++i) {
780 UChar ch = skeleton[i];
917 * 2. there might be no pattern for 'y' differ for skeleton "Md",
919 * need to look for it from skeleton 'yMd'
921 * @param dateSkeleton normalized date skeleton
922 * @param timeSkeleton normalized time skeleton
923 * @return whether the resource is found for the skeleton.
924 * TRUE if interval pattern found for the skeleton,
932 const UnicodeString* skeleton;
933 // if both date and time skeleton present,
939 skeleton = &timeSkeleton;
941 skeleton = &dateSkeleton;
944 /* interval patterns for skeleton "dMMMy" (but not "dMMMMy")
946 * interval patterns for skeleton "dMMMMy" are calculated by
947 * 1. get the best match skeleton for "dMMMMy", which is "dMMMy"
952 // best skeleton, and the difference information
954 const UnicodeString* bestSkeleton = fInfo->getBestSkeleton(*skeleton,
956 /* best skeleton could be NULL.
963 and the best skeleton match could be NULL
970 // 0 means the best matched skeleton is the same as input skeleton
975 // skeleton has different fields, not only v/z difference
982 skeleton
983 setIntervalPattern(UCAL_DATE, skeleton, bestSkeleton, differenceInfo,
986 UBool extended = setIntervalPattern(UCAL_MONTH, skeleton, bestSkeleton,
992 skeleton = &extendedSkeleton;
994 setIntervalPattern(UCAL_YEAR, skeleton, bestSkeleton, differenceInfo,
997 setIntervalPattern(UCAL_MINUTE, skeleton, bestSkeleton, differenceInfo);
998 setIntervalPattern(UCAL_HOUR, skeleton, bestSkeleton, differenceInfo);
999 setIntervalPattern(UCAL_AM_PM, skeleton, bestSkeleton, differenceInfo);
1008 const UnicodeString& skeleton,
1013 UnicodeString pattern = fDtpng->getBestPattern(skeleton, status);
1100 * but also return the extended skeleton and its best match skeleton.
1103 * @param skeleton skeleton
1104 * @param bestSkeleton the best match skeleton which has interval pattern
1106 * @param differenceInfo the difference between skeleton and best skeleton
1107 * 0 means the best matched skeleton is the same as input skeleton
1112 * @param extendedSkeleton extended skeleton
1113 * @param extendedBestSkeleton extended best match skeleton
1115 * through extending skeleton or not.
1117 * extending skeleton, FALSE otherwise.
1122 const UnicodeString* skeleton,
1149 // else, looking for pattern when 'y' differ for 'dMMMM' skeleton,
1151 // since there is no pattern for 'y' differs for skeleton 'MMMd',
1152 // need to look for it from skeleton 'yMMMd',
1157 *extendedSkeleton = *skeleton;
1162 // skeleton "MMMM".
1165 // if there is no skeleton "yMMMM" defined,
1166 // look for the best match skeleton, for example: "yMMM"
1179 adjustFieldWidth(*skeleton, *bestSkeleton, pattern, differenceInfo,
1303 const UnicodeString& skeleton)
1306 return ( (skeleton.indexOf(fieldChar) == -1)?FALSE:TRUE ) ;
1364 // there is no "L" (always be "M") in skeleton,
1366 // for skeleton "M+", the pattern might be "...L..."
1403 // there is no "L" (always be "M") in skeleton,
1405 // for skeleton "M+", the pattern might be "...L..."