strftime函数中%C和%y说明符有什么区别?
admin 发表于 2010-04-21 | 来源:互联网 | 阅读:

我用的Dev-c++编译器 用%C 没反应的(2010年)用%Y才行。
看书和百度百科%C和%Y都是0~99十进制数字表示的年份阿。
这两个说明符有什么区别阿?

已经有4 个评论
  1. 风子 说:

    The formatting codes for strftime are listed below:  %aAbbreviated weekday name%AFull weekday name%bAbbreviated month name%BFull month name%cDate and time representation appropriate for locale%dDay of month as decimal number (01 – 31)%HHour in 24-hour format (00 – 23)%IHour in 12-hour format (01 – 12)%jDay of year as decimal number (001 – 366)%mMonth as decimal number (01 – 12)%MMinute as decimal number (00 – 59)%pCurrent locale’s A.M./P.M. indicator for 12-hour clock%SSecond as decimal number (00 – 59)%UWeek of year as decimal number, with Sunday as first day of week (00 – 53)%wWeekday as decimal number (0 – 6; Sunday is 0)%WWeek of year as decimal number, with Monday as first day of week (00 – 53)%xDate representation for current locale%XTime representation for current locale%yYear without century, as decimal number (00 – 99)%YYear with century, as decimal number%z, %ZEither the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown%%Percent sign

  2. yyyy6 说:

    yuzl32的说明是哪里的呢?http://baike.baidu.com/view/1284677.htm和21day学会C里面都有%C(大写C)哦 莫非…又是错误?

  3. nashliu 说:

    小写c.查阅MSDN。

  4. xjhuc05 说:

    没有大写C?那找个人更正一下百度百科吧

我要评论

评论功能因故关闭!

请加入我们的QQ群一起参与讨论:群号59400482(500人超级群)


返回首页 | 关于我们 | 联系我们 | 广告合作 | 网站地图 | 友情链接 | 版权声明