Different symbolic identifiers for datestr and datetime

In datestr , 'mm' indicates month while 'MM' indicates minutes. The opposite is true for datetime . Is this difference necessary? The resulting confusion when attempting to use a standard format string is uncalled for.

回答 (1 件)

Steven Lord
Steven Lord 2016 年 10 月 3 日

0 投票

See the comment by Peter Perkins on this Answer.
The datetime format string uses the Unicode LDML standard where m refers to minute data and M to month. The datetick and datestr functions predate that standard and their convention uses m to represent month and M to represent minute.

カテゴリ

ヘルプ センター および File Exchange で Dates and Time についてさらに検索

質問済み:

2016 年 10 月 3 日

回答済み:

2016 年 10 月 3 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by