NSDateFormatter dateFromString return nil when string is a Daylight Saving Time

http://stackoverflow.com/questions/23833038/a-bug-nsdateformatter-datefromstring-returns-null-only-for-this-date-string

http://blog.csdn.net/longzs/article/details/51132999

 

如果DateFormatter的时区设置为我国实行了夏令时的城市,19860504、19870412、19880410、19890416、19900415、19910414 这些日期转换成NSDate对象为nil

这个case的代码修改方式为:给dateFormatter显示设置时区偏移量

[dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:3600*8]];

https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSTimeZone_Class/index.html#//apple_ref/occ/clm/NSTimeZone/timeZoneForSecondsFromGMT:

autolayout leading trailing left right

https://developer.apple.com/library/mac/recipes/xcode_help-IB_auto_layout/chapters/UnderstandingAutolayout.html

http://stackoverflow.com/questions/19971508/difference-between-nslayoutattributeleft-vs-nslayoutattributeleading

 

Left refers to the left edge of an item’s alignment rectangle, Bottom refers to the bottom edge of an item’s alignment rectangle, Width refers to the width of an item’s alignment rectangle, and so forth. With constraints, you align these rectangles, define the space between them, and size them.

Leading refers to the edge of the alignment rectangle where words and sentences begin; Trailing refers to the edge where words and sentences end. For left-to-right languages such as English, Leading is the same as Left, whereas in a right-to-left environment such as Hebrew or Arabic, Leading is the same as Right. Similarly, Trailing is the same as Right for English, but Trailing is the same as Left for Hebrew and Arabic. You should use Leading and Trailing to make sure your interface is laid out appropriately in all languages, unless the horizontal position should remain fixed at left or right regardless of the language.

 

difference between %f %e and %g

https://www.quora.com/What-are-the-differences-between-f-e-and-g-format-specifiers-in-C-language-Explain-with-examples-in-which-these-format-specifiers-are-emplyed

 

Indra Bhattacharya, I know C language in deep.I have done many projects in C..

2.8k Views
Real constants are often called Floating Point constants. The real constants could be written in two forms-Fractional form and Exponential form.
The exponential form is usually used if the value of the constant is either too small or too large. It, however, doesn’t restrict us in any way from using exponential form for other real constants.
Now, if you want to print the Floating point constant in Fractional form then use %f as format specifier and if you want to print it in Exponential form then use %e or %E format specifier. The only difference between %e and %E is that they will print the “e” of the exponential form in lower case and upper case respectively.
But, if you want to print the Floating Point constant in Fractional form when the constant is not very big or very small and in Exponential form when the constant is either very big or very small, then use %g or %G as format specifier. The only difference between %g and %G is that they will print the “e” of the exponential form in lower case and upper case respectively. It will print in Fractional form when the constant is between .999999 and 999999, but when the constant is not in the range, it will print the constant in Exponential form.