Bug 15605 - NSDateFormatter does not include bindings for "LocalizedStringFromDate" or "DateFormatFromTemplate"; these might be useful until bug #1068 is fixed
Summary: NSDateFormatter does not include bindings for "LocalizedStringFromDate" or "D...
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.2.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-10-22 21:23 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-04-01 05:07 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-10-22 21:23:42 UTC
The NSDateFormatter class does not includes bindings for 

> + (NSString *)localizedStringFromDate:(NSDate *)date dateStyle:(NSDateFormatterStyle)dateStyle timeStyle:(NSDateFormatterStyle)timeStyle

or 

> + (NSString *)dateFormatFromTemplate:(NSString *)template options:(NSUInteger)opts locale:(NSLocale *)locale



Similarly, NSDate does not include a binding for
> - (NSString *)descriptionWithLocale:(id)locale


This looks like an intentional choice to reduce redundancy with the C# methods. But at the moment, the C# methods will not properly localize if the user sets a custom calendar type or a custom time format because of bug #1068. So perhaps it would be acceptable to bring these methods back into the bindings until bug #1068 is fixed?
Comment 2 Rolf Bjarne Kvinge [MSFT] 2013-10-25 05:15:14 UTC
Fixed.

maccore/master: 70771ded920d73cf05414d117986b5c28cc1eb7d
monotouch/master: 854264486b41d5f55dfda407d0e924aed43562ad

The fix will likely be included in Xamarin.iOS 7.0.5 (but it's a bit too early
to say for sure yet).
Comment 3 Sadik Ali 2014-04-01 05:07:29 UTC
I have verified this issue and noticed that  NSDateFormatter included bindings "localizedStringFromDate" and "dateFormatFromTemplate" 

and NSDate class included binding descriptionWithLocale

Screen cast: http://screencast.com/t/8kpA77OK

Build Info:

=== Xamarin Studio ===
Version 4.2.4 (build 266)

=== Apple Developer Tools ===
Xcode 5.0 (3332.22)
Build 5A1412	

=== Xamarin.iOS ===
Version: 7.2.2.14 (Enterprise Edition)

=== Build Information ===
Release ID: 402040266
Git revision: 57fa6b7639703775ae1d5c46536e42ab424cb177
Xamarin addins: eee141c29724a19529e77b8e743086d95b29f5ba

=== Operating System ===
Mac OS X 10.8.5