• Home
  • History
  • Annotate
  • only in /frameworks/base/core/java/android/text/format/
History log of /frameworks/base/core/java/android/text/format/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3d1728c03a0cd1aaed6bc81c97de27d62c771a6e 01-Nov-2012 Romain Guy <romainguy@google.com> A new clock widget to create lock screen appwidgets

This new widget replaces DigitalClock. It listens to all the correct
system events and offer the ability to customize the formatting
patterns in 12-hour and 24-hour modes. It also supports fixed
time zones to create world clocks.

One more step towards becoming ClockOS!

Change-Id: I677e5dfca8cd8c8d1f8c49e54d7507f4d1885bf4
ateFormat.java
9ccf13cd6b7c840105fbcd6b2a8bd61d4e634653 19-Sep-2012 Elliott Hughes <enh@google.com> Fix formatDateRange month names for Farsi.

This removes the LLLs seen in Calendar and Settings, for example.

Bug: 6811327
Change-Id: I87c2ab9ee8d897171ce7ca4fe06cfa8b11d36536
ateUtils.java
6323b6c61775992e400c2d38981332583107c32b 19-Sep-2012 Elliott Hughes <enh@google.com> Use localized digits for Time formatting.

This fixes the digits in places like Settings' data usage page
and Calendar's drop-down, for languages such as Arabic.

Bug: 6811327
Change-Id: I2dafcc342e3279937735697b3748b47fdfc8e691
ime.java
315a7c0335fb54beced23b1703c10563ce02ee82 18-Sep-2012 Roozbeh Pournader <roozbeh@google.com> Use proper digits in formatElapsedTime and format3339

Use getZeroDigit() instead of a hard-coded '0' for formatting times using
formatElapsedTime, so locales with different digits like Arabic and Persian
could display the elapsed time properly. This is visible in Settings' list
of running apps.

Also changed android.text.format.Time's format3339 method to always use ASCII
digits, irrespective of the locale.

Change-Id: I731c96c21b3712ec347d9526e4ec3fe884dec276
ateUtils.java
ime.java
34de3bc309fd9077cc1aa1e1af82652670fdb9df 15-Sep-2012 Elliott Hughes <enh@google.com> Fix date formatting for fa locales.

This adds support for standalone months (L versus M) and localized
digits.

Bug: 6811327
Change-Id: I4687a4c67605c31b155c0b8d44b3da6ed378fc82
ateFormat.java
c3ff72f5bd5896ad2584e0cc0582cbd2ad8191f2 15-Aug-2012 Elliott Hughes <enh@google.com> Use icu4c for CLDR "yesterday", "today", and "tomorrow" strings.

(cherry-pick of 47a0539ecaf7d7a15008704bd89f748aebf85d47.)

Conflicts:

core/res/res/values/public.xml

Bug: 6811501
Change-Id: Ifb2e030a9fda85a7f664feac812b63e67780e68f
ateUtils.java
08153ee01e6aa67061f628bc3fed66c6400dfd1c 07-Aug-2012 Elliott Hughes <enh@google.com> Switch DateUtils and Time over to using the CLDR for all week and month names.

(cherry-pick of 99c406e42ba154584070ca7ec100e8be7ff8a800.)

Conflicts:

core/res/res/values-fa/donottranslate-cldr.xml
core/res/res/values/public.xml

Bug: 6811501
Change-Id: I2ad9608ae34804e02c6b0271197e96611df12b0a
ateUtils.java
ime.java
4af85345e798c37ab026e93a1ae250d8bca4fc40 26-Jul-2012 Elliott Hughes <enh@google.com> Use ICU's CLDR data for "AM" and "PM" strings.

This brings DateUtils and Time in sync with bionic, icu, WebKit,
DateFormatSymbols, Formatter, and SimpleDateFormat. And specifically
means that DateUtils now knows how to say "AM" and "PM" in Japanese.

Bug: 6719054

(cherry-pick of b12b61a88a029730b1f2b006ff914c9c719f3942.)

Conflicts:

core/res/res/values/public.xml

Change-Id: Ic1a811621a0ec338abd77458ac2046577f87c1e4
ateUtils.java
ime.java
9ceede6d7e250922e63b0d2c90403089f8736e0c 15-Sep-2012 Elliott Hughes <enh@google.com> am 086676a4: am f5437ee8: am 297ad257: Merge "Deprecate those parts of DateUtils the documentation says not to use."

* commit '086676a4a669b5d3a90c01e4d88ab8d628ca65f0':
Deprecate those parts of DateUtils the documentation says not to use.
d3c01012d8d329e541214e8207272ab5cc9ca004 29-Aug-2012 Elliott Hughes <enh@google.com> Deprecate those parts of DateUtils the documentation says not to use.

Applications using these fields and methods are just asking for i18n bugs.

Also @deprecate two int[]s that were never meant to be public.

Change-Id: I29b3a1c0c663fe344d2567df6ed3bb537270b3b7
ateUtils.java
5ef49427b6e735ba17d96184ac2bcbcafb434d82 26-Jul-2012 Elliott Hughes <enh@google.com> Fix Time.parse and Time.parse3339 crashing bugs. DO NOT MERGE

Two reported by users, the other spotted by inspection.

Bug: http://code.google.com/p/android/issues/detail?id=16002
Bug: http://code.google.com/p/android/issues/detail?id=22225
Change-Id: I86fe022fda4af68e5a6fb9dc5dd2abdb75e9d966

This was committed to master, cherry-picking to jb-mr1-dev
ime.java
ca3363775e03e0f90bdf111d3e5c54b3ab16df57 27-Aug-2012 Steve Pomeroy <steve@staticfree.info> Fixes relative time formatting issue for dates in future

All variations of getRelativeTimeSpanString() now properly handle dates
that are in the future. Prior, the version used by
getRelativeDateTimeString() would occasionally show the time instead of
a date when the future date was the same weekday as the current weekday.
This resulted in the time output being duplicated, eg.: "11:23, 11:23"

Change-Id: If20972a6942cce792fa233437f94dedfb71379f3
Signed-off-by: Steve Pomeroy <steve@staticfree.info>
ateUtils.java
11afa8a466be7fd0bb486b36612d656a09f88f46 26-Jan-2012 Alon Albert <aalbert@google.com> Throw NPE if s is null

Bug: 5926510
Change-Id: I3d0a38d31695a8b103b3d153d90d83474f56990e
ime.java
c789b60076aa8ff4b2824ced6c998d667f6945c1 12-Dec-2011 Joe Malin <jmalin@google.com> am 8e94d912: am 556e4ca5: am 0a9005ed: Merge "DOC CHANGE: Package text and Formatter javadoc" into ics-mr0

* commit '8e94d912c6e0fc3c6d5e992b6559a0efc20372be':
DOC CHANGE: Package text and Formatter javadoc
556e4ca54161be17333ec98fadc113485120a6e8 09-Dec-2011 Joe Malin <jmalin@google.com> am 0a9005ed: Merge "DOC CHANGE: Package text and Formatter javadoc" into ics-mr0

* commit '0a9005ed58d3a6173e8fffbd72933f7646c6fdba':
DOC CHANGE: Package text and Formatter javadoc
41e2e1f9919c9ae3593610f7e05f0d9cf69ec9b2 07-Dec-2011 Joe Malin <jmalin@google.com> DOC CHANGE: Package text and Formatter javadoc

Change-Id: Ia34bf38d07b474522f65b89db4991c32909ecff2
ormatter.java
ackage.html
4cf8a3914aa365fefc6c231c48075ecc5a096a65 23-Nov-2011 Owen Lin <owenlin@google.com> am 85c38af1: am 8bb56180: Merge "Fix 5654631. It forgot to consider the year in formatDateRange." into ics-mr1

* commit '85c38af1d47e288775052cd188e3f014fa40e8a2':
Fix 5654631. It forgot to consider the year in formatDateRange.
b193e35ed131769e6c98b2752635065489198aeb 22-Nov-2011 Owen Lin <owenlin@google.com> Fix 5654631. It forgot to consider the year in formatDateRange.

Change-Id: I494e3ecc7a2e7c418ed61930ffd7311338c11783
fix: 5654631
ateUtils.java
99a64f4b1d2519b71558fdc62721686445865b60 11-Nov-2011 Jesse Wilson <jessewilson@google.com> Document our potentially suprising behavior on date ranges ending at midnight.

Bug: http://code.google.com/p/android/issues/detail?id=18512
Change-Id: I968ca1cfcef79273ee856624a640d56b038b96be
ateUtils.java
31e04656e77a881960daa7a6974e8f805d9cef43 29-Sep-2011 Scott Main <smain@google.com> docs: add some more info to Time javadocs

Change-Id: I3c5ca668acda734f8a0da0ffbbc1bfa77ed72c2a
ime.java
467cabe879cb58df96f6a84879f5fb226e049aeb 26-Jul-2011 Kenny Root <kroot@google.com> Throw NullPointerException on args to Time#compare

Check for null on arguments to Time#compare(Time, Time) before passing
it down to JNI code.

Bug: 5073949
Change-Id: I077e9d5194a89206d1e51fc89a72c8a72e29f8f1
ime.java
7719436342611a106df5d379fedf180a5dd0809e 28-Feb-2011 Xavier Ducrohet <xav@android.com> am b732b7b5: am ce57a7f3: am 6504490c: am dff6b8e7: Merge "Add --non-constant-id to aapt."

* commit 'b732b7b5e8192501360edc15fb8c6399d11fb97d':
GpsLocationProvider: Clean up HAL initialization/cleanup sequence
Fixed GSM encoded network initiated position request
Ensuring thread-safe usage of DateFormat.
Fixing infinite loop for zero duration.
Fix for an infinite loop while scrolling lists.
WAPPushManager, WAP Push over SMS message handler
Add --non-constant-id to aapt.
b732b7b5e8192501360edc15fb8c6399d11fb97d 28-Feb-2011 Xavier Ducrohet <xav@android.com> am ce57a7f3: am 6504490c: am dff6b8e7: Merge "Add --non-constant-id to aapt."

* commit 'ce57a7f35344e76689d30f45964d1e37b78280cb':
GpsLocationProvider: Clean up HAL initialization/cleanup sequence
Fixed GSM encoded network initiated position request
Ensuring thread-safe usage of DateFormat.
Fixing infinite loop for zero duration.
Fix for an infinite loop while scrolling lists.
WAPPushManager, WAP Push over SMS message handler
Add --non-constant-id to aapt.
25d8b05fb77e8ee755aacd27c1c2d3b237537b7a 22-Feb-2011 Jozef BABJAK <jozef.babjak@gmail.com> Ensuring thread-safe usage of DateFormat.

DateFormat is inherently unsafe for multithreaded use. This patch adds
proper synchronization. The 'sLock' is re-used. To avoid two consecutive
lockings, locked version of initFormatStrings() method is created and
used where appropriate, i.e. in original method AND in added synchronized
block.

Change-Id: Id3c34613623e743e703aadb2342aa788679dda8a
ateUtils.java
07481ccd1dcc2912797ec64f0bfa5641b39adcea 07-Jan-2011 Jesse Wilson <jessewilson@google.com> Deprecate a method that formats only IPv4 addresses.

Anyone calling this method is probably storing IP addresses
in an int, which doesn't make sense anymore.

Change-Id: Iba535b66f6cff47ce07b5ecc6427e3b2fd846998
ormatter.java
50f34d14f6dd3411fdbdb6a7b8b285c2b8fdbf5c 04-Dec-2010 Svetoslav Ganov <svetoslavganov@google.com> Adding DatePciker widget based on the Calednar team code. Updated DatePciker and DatePickerDialog as the second part of the Time/Date pciker refresh feature.

Change-Id: Id32c614bcd799463ca33bf08fb7d5cf44f8326a6
ime.java
c4f628a1ba359926cf53ed7652d9abba6ea29123 08-Sep-2010 Erik <roboerik@android.com> am c0b4f6d3: Merge "Adds a time zone parameter to formatDateRange" into gingerbread

Merge commit 'c0b4f6d30d962d75125628317b5f5ea622531dfe' into gingerbread-plus-aosp

* commit 'c0b4f6d30d962d75125628317b5f5ea622531dfe':
Adds a time zone parameter to formatDateRange
577ec9eb3a661de96a2cbe9ec918eda082fb7659 02-Sep-2010 Erik <roboerik@android.com> Adds a time zone parameter to formatDateRange

For a critical feature request in Calendar we need the ability
to format a date range in a time zone other than the local tz.
This adds a new method signature to formatDateRange to allow for
a tz to be specified and maintains the old behavior if the parameter
is not used. Also deprecates the FORMAT_UTC flag.

Change-Id: I16b3e939760ec86c954b51a318d01b7bbf86acc9
ateUtils.java
0df10e9b4e7719777ff9a389959c5c5deeef0eae 06-Jul-2010 Christian Mehlmauer <FireFart@gmail.com> Documentation Bug (Issue 9557)

There was an issue in the Time.toMillis example.
Also removed some whitespaces so the file
applies to the Android coding Styleguide

Change-Id: Ic1383e506b30ff181c6e14a12f675b52e5c8ccbc
ime.java
f1f33c4eb2ded794c74285d8a036073ae5419f25 18-Jun-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: If7ae0c5629d1b3c540cacfa517425c2e6b5822d1
6a84af0949b341593b4b25ed9bb365bd60ff1254 29-Mar-2010 David Sobreira Marques <dpsmarques@gmail.com> Fixing counting the number of days in call log screen.

Counting the number of days in call log screen when a
call was made/received within a week is not correct.

Issue 3132: Call Log Reporting Wrong

Change-Id: I99c3cb40267b4b5938ccc4225993b7aac7e2d018
Signed-off-by: David Sobreira Marques <dpsmarques@gmail.com>
ateUtils.java
a53bbe4033f1e9fc4c371d51ba1ef58588f867eb 01-Mar-2010 Ken Shirriff <kens@google.com> Remove DateException and obsolete DateUtils functions.

These functions are deprecated and no longer used.
ateUtils.java
bfe319e06aa56c081d0d94d64a8181291d7f7388 21-Sep-2009 Dianne Hackborn <hackbod@google.com> Turn animations on by default.

Add API to skip the animation for a particular start activity, so that
a latter better one can be used.

Fix Theme.NoDisplay to actually work.

Fiddle with various animations: don't do a different animation for task
switching, try a scale animation for switching in/out of the wallpaper.

Adjust the animation duration so that at normal speed we have something
more like the slower animation option (so slow is now the default).

Change-Id: Ieba9f3db0bd9a762a19b327a3ecccbc7b547893d
ormatter.java
41220f2c5b674e317a9edd526bcfca6c542c1a15 25-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 7c187de1: Merge change 8462 into donut

Merge commit '7c187de14f6b5ec6d90bc8e26265a2ca2824e39a'

* commit '7c187de14f6b5ec6d90bc8e26265a2ca2824e39a':
Make the DatePicker respect the date format setting if the date is numeric.
03a8017d0fe3b55b69c4328aa0d27bd96a2f1360 24-Jul-2009 Eric Fischer <enf@google.com> Make the DatePicker respect the date format setting if the date is numeric.

In some locales, there are no abbreviated month names; the abbreviated
date formats are essentially numeric. If the user is in such a locale,
have the DatePicker respect the date format setting so that the order
of the fields will match other numeric-only dates.

In locales that have abbreviated month names, continue to use the order
that is normal in spelled-out dates.

And update the order in updateDate() so that the new order is reflected
if you change the order setting and immediately go to change the date
without leaving and returning to the Date & Time settings in between.

At the same time, change DateFormat.getDateFormatOrder() back to working
the way it did in cupcake (prioritizing the date order preference over
the locale), even though the DatePicker no longer calls the method.

Bug 1805085
ateFormat.java
becfc9de9e18ef216c2b537cd2829f1d2d55404f 30-Jun-2009 Michael Chan <mchan@android.com> Added a Formatter parameter to DateUtils.formatDateRange

DateUtils.formatDateRange is using String.format which isn't efficient for
formatting large number of strings. I have added the Formatter parameter which
allows the caller to reuse the formatter of subsequent calls for faster
performance.
ateUtils.java
5669ce59aad19f17e1e89913e7483fb93b8aa0cf 18-Jun-2009 Eric Fischer <enf@google.com> Work around the Czech lack of abbreviated month names.

Make the date formats that want abbreviated month names use either
the full name or a numeric format.
ateUtils.java
7351dd113f26580f3bcc7500746f3a26aecc4260 13-Jun-2009 Eric Fischer <enf@google.com> Use locale-appropriate formatting to display application sizes like "252KB".

In particular allow the French and Polish translators to put a space between
the number and the unit.
ormatter.java
328769582328192f8f361dcb56f2ad67ad00ae2c 12-Jun-2009 Eric Fischer <enf@google.com> Make the date format preference work again.

It is only used for numeric dates -- spelled-out dates have such a complex
variety of formats that they can only be meaningfully formatted from
locale strings.

In addition, the preference is left null when initializing, on the assumption
that the locale will still specify a more useful numeric format than we can
guess as part of a build-wide configuration.

But if the user has specified a format, the date will be formatted in the
order they asked for, with locale-appropriate punctuation substituted in.
ateFormat.java
af0e7a7394bf1e2596c46f81c3b0302a56daab96 11-Jun-2009 Eric Fischer <enf@google.com> Hook the 12- or 24-hour time format checkbox back up.

The format strings are newly generated from CLDR. The code is once again
the same as in cupcake: do the natural thing for the locale if the user
has never specified, but follow the checkbox if the user has ever set it.
ateFormat.java
84c863d9af1270a2ccd2ccd2b8c1a753826dfe6d 10-Jun-2009 Eric Fischer <enf@google.com> Fix some 12- vs 24-hour problems in the FormatDateRange strings.

Use a resource instead of a hardcoded string for the 24-hour format
since it is not exactly the same in every locale.

Make sure the 12-hour format is actually for a 12-hour clock, even in
locales where this is not a normal thing to do. In the cap_ampm version,
do not have it try to capitalize "am" and "pm" if these are non-ASCII
strings, since strftime() doesn't know about Unicode and will mess it up.

Add a comment so that people don't think the YEAR_IN_MILLIS constant is
actually the length of any real year.
ateUtils.java
5bd644caf73e76750feef1a82b8817d32f5367fc 13-May-2009 Eric Fischer <enf@google.com> Start using CLDR for some date-and-time strings and formats.

Use java.text.DateFormat where possible, since that is already using
the CLDR data for the things it supports. Remove an unused date format
object from DatePickerDialog.

Add a new method for getting the standalone month names from applications,
although @hidden for now because it is an API change.

Pass the standalone month names down to native code in Time so that
tztime's strftime() can use them.

And then the bulk of the change: replace all the names for the months
and the days of the week, and AM and PM, and yesterday, today, and tomorrow,
with strings from CLDR. And replace several of the date format strings
with ones derived from CLDR, but reformatted to use strftime() style
instead of SimpleDateFormat style.

All these resource changes go into new donottranslate-cldr.xml files
and are removed from strings.xml so that they aren't part of the
normal translation process and the translators don't have to bother
with them (and risk messing them up).
ateFormat.java
ateUtils.java
ime.java
670bf11fcf9e0a73007b9b814069aa575a872096 27-Apr-2009 Ken Shirriff <kens@google.com> Document exception from parse3339
ime.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ateFormat.java
ateUtils.java
ormatter.java
ime.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ateFormat.java
ateUtils.java
ormatter.java
ime.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
ateUtils.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
ateUtils.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
ime.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
ateFormat.java
9266c558bf1d21ff647525ff99f7dadbca417309 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
ateFormat.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
ateUtils.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
ateFormat.java
ateUtils.java
ormatter.java
ime.java