| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011,2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 417 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 418 String Locale::localizedDecimalSeparator() | 418 String Locale::localizedDecimalSeparator() |
| 419 { | 419 { |
| 420 initializeLocaleData(); | 420 initializeLocaleData(); |
| 421 return m_decimalSymbols[DecimalSeparatorIndex]; | 421 return m_decimalSymbols[DecimalSeparatorIndex]; |
| 422 } | 422 } |
| 423 #endif | 423 #endif |
| 424 | 424 |
| 425 String Locale::formatDateTime(const DateComponents& date, FormatType formatType) | 425 String Locale::formatDateTime(const DateComponents& date, FormatType formatType) |
| 426 { | 426 { |
| 427 if (date.type() == DateComponents::Invalid) | 427 if (date.getType() == DateComponents::Invalid) |
| 428 return String(); | 428 return String(); |
| 429 | 429 |
| 430 DateTimeStringBuilder builder(*this, date); | 430 DateTimeStringBuilder builder(*this, date); |
| 431 switch (date.type()) { | 431 switch (date.getType()) { |
| 432 case DateComponents::Time: | 432 case DateComponents::Time: |
| 433 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo
rmat()); | 433 builder.build(formatType == FormatTypeShort ? shortTimeFormat() : timeFo
rmat()); |
| 434 break; | 434 break; |
| 435 case DateComponents::Date: | 435 case DateComponents::Date: |
| 436 builder.build(dateFormat()); | 436 builder.build(dateFormat()); |
| 437 break; | 437 break; |
| 438 case DateComponents::Month: | 438 case DateComponents::Month: |
| 439 builder.build(formatType == FormatTypeShort ? shortMonthFormat() : month
Format()); | 439 builder.build(formatType == FormatTypeShort ? shortMonthFormat() : month
Format()); |
| 440 break; | 440 break; |
| 441 case DateComponents::Week: | 441 case DateComponents::Week: |
| 442 builder.build(weekFormatInLDML()); | 442 builder.build(weekFormatInLDML()); |
| 443 break; | 443 break; |
| 444 case DateComponents::DateTime: | 444 case DateComponents::DateTime: |
| 445 case DateComponents::DateTimeLocal: | 445 case DateComponents::DateTimeLocal: |
| 446 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon
ds() : dateTimeFormatWithSeconds()); | 446 builder.build(formatType == FormatTypeShort ? dateTimeFormatWithoutSecon
ds() : dateTimeFormatWithSeconds()); |
| 447 break; | 447 break; |
| 448 case DateComponents::Invalid: | 448 case DateComponents::Invalid: |
| 449 ASSERT_NOT_REACHED(); | 449 ASSERT_NOT_REACHED(); |
| 450 break; | 450 break; |
| 451 } | 451 } |
| 452 return builder.toString(); | 452 return builder.toString(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |