I want to get a particular format for my date in my i OS app. I want to display the date with the following format if the text was received less than a week ago: "Today, PM" "Yesterday, AM" "Monday, PM" etc. I've tried few combinations without success, the main problem reside in the first part; Today/yesterday, etc. But, unless you're all tied up in matching the locale or some such, it's a fairly simple matter to just write some code to do it. (The day part isn't working, I have trouble getting the "date From Template" & "time Style" to work at the same time.) NSString *date Components = @"eee"; formatter=NSDate Formatter alloc] init]; Style=NSDate Formatter Short Style; [formatter set Date Format:[NSDate Formatter date Format From Template:date Components options:0 locale:[NSLocale autoupdating Current Locale]; Relative Date Formatting=YES; formatter.locale=[NSLocale autoupdating Current Locale]; NSDate Formatter alone won't do it.]]
This article demonstrates how to consume an WCF Simple Object Access Protocol (SOAP) service from a Xamarin. /samples/monotouch/Binding Sample/ App shows how to utilize an existing Objective-C library and expose it for use in Xamarin.i OS project.
There are many places where format strings behave in unexpected ways.
For example: If you're working with user-visible dates, you should avoid setting a fixed date format string because it's very hard to predict how your format string will be expressed in all possible user configurations.
/samples/monotouch/Image Protocol/ This sample illustrates how to register a custom NSUrl Protocol.
/samples/monotouch/Print Sample/ A simple example of using the UIKit Printing API in a Xamarin.i OS application.
Search for autoupdatingcurrentlocale ios:
Next, it creates a standard date formatter for rendering the date as a string to display to the user.