| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 6 | 2 | 3 | 0.980 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 6 | 565 | Closure/closure/goog/i18n/datetimeformat.js |
| 2 | 6 | 583 | Closure/closure/goog/i18n/datetimeformat.js |
| ||||
/**
* Formats TimeZone field following RFC
*
* @param {number} count Number of time pattern char repeats, it controls
* how a field should be formatted.
* @param {Date} date It holds the date object to be formatted.
* @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
* @return {string} Formatted string that represent this field.
* @private
*/
goog.i18n.DateTimeFormat.prototype.formatTimeZoneRFC_=
function (count, date, opt_timeZone){
opt_timeZone= opt_timeZone
||goog.i18n.TimeZone.createTimeZone(date.getTimezoneOffset( ));
return count< 4
? opt_timeZone.getRFCTimeZoneString(date)
: opt_timeZone.getGMTString(date);
} ;
|
| ||||
/**
* Generate GMT timeZone string for given date
* @param {number} count Number of time pattern char repeats, it controls
* how a field should be formatted.
* @param {Date} date Whose value being evaluated.
* @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
* @return {string} GMT timeZone string.
* @private
*/
goog.i18n.DateTimeFormat.prototype.formatTimeZone_=
function (count, date, opt_timeZone){
opt_timeZone= opt_timeZone
||goog.i18n.TimeZone.createTimeZone(date.getTimezoneOffset( ));
return count< 4
? opt_timeZone.getShortName(date)
: opt_timeZone.getLongName(date);
} ;
|
| |||
/**
* Generate GMT timeZone string for given date
* @param {number} count Number of time pattern char repeats, it controls
* how a field should be formatted.
* @param {Date} date Whose value being evaluated.
* @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
* @return {string} GMT timeZone string.
* @private
*/
/**
* Formats TimeZone field following RFC
*
* @param {number} count Number of time pattern char repeats, it controls
* how a field should be formatted.
* @param {Date} date It holds the date object to be formatted.
* @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
* @return {string} Formatted string that represent this field.
* @private
*/
goog.i18n.DateTimeFormat.prototype. [[#variable62dbd7c0]]= function (count,date,opt_timeZone)
{ opt_timeZone=opt_timeZone
|| goog.i18n.TimeZone.createTimeZone(date.getTimezoneOffset( ));
return count<4
?opt_timeZone. [[#variable1f790b80]](date)
:opt_timeZone. [[#variable1f790a60]](date);
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#62dbd7c0]] | formatTimeZone_ |
| 1 | 2 | [[#62dbd7c0]] | formatTimeZoneRFC_ |
| 2 | 1 | [[#1f790b80]] | getShortName |
| 2 | 2 | [[#1f790b80]] | getRFCTimeZoneString |
| 3 | 1 | [[#1f790a60]] | getLongName |
| 3 | 2 | [[#1f790a60]] | getGMTString |