本文介绍了日期格式:Android的联系人生日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这跟生日和纪念日工作:

我得到的信息和生日这样的2012年12月2日或2012年12月2日或2012年12月2日或12年2月12日

问:


  1. 是日期格式在所有三星手机一样。如果是的话是什么日期格式。

    (猜将无法在所有Android手机工作作为生日日期都存储在许多不同的格式)


  2. 如何识别一样,如果日期是2012年2月12日或2012年2月12日或任何其他日期字符串模式的日期格式。它是格式为YYYY-MM-DD或MMM DD,YYYY或任何其他的?
    例如:如果日期是2012年2月12日,那么日期格式为DD MMM YYYY



解决方案

日期存储为YYYY-MM-DD。

使用日期格式化器类将其转换成任何您需要的格式。

当您想更新把它在相同的格式,您已经阅读。

Working on Contact birthday and Anniversary:

I get details and birthday like this 12.2.2012 or 12/2/2012 or 12-02-2012 or 2/12/12

Question:

  1. Is the date Format same across all Samsung Phones. IF yes what is the date format.

    (Guess won't work on all Android phones as birthday dates are stored in many different format)

  2. How to identify the date format like if the date is 12.2.2012 or Feb 12 2012 or any other date string pattern. Is it of format "yyyy-MM-dd" or "MMM dd, yyyy" or any other?ex: if date is "Feb 12 2012" then date format is "MMM dd yyyy"

解决方案

The date is stored as "YYYY-MM-DD".

Use the date formater class to convert it into any format you need.

When you want to update put it in the same format as you have read.

这篇关于日期格式:Android的联系人生日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:36