Xamarincommunitytoolkit: [Enhancement] Add DateTimeOffset Converter

Created on 25 Aug 2020  路  6Comments  路  Source: xamarin/XamarinCommunityToolkit

Summary

Add a converter for converting from DateTimeOffset to DateTime and back.

API Changes

Adds a new Converter To the converters.

Intended Use Case

Often times DateTime is stored with the offset on the backend to allow for storing the timezone in which a DateTime originated from. Controls like the DatePicker in Xamarin.Forms will only work with DateTime. To be able to easily hook up ViewModels/Models containing a DateTimeOffset property this converter would come in handy.

converters feature-request ready-to-implement

All 6 comments

I would also be happy to provide the implementation of the DateTimeOffsetConverter 馃檪

Love it! A go from me :)

It鈥檚 a yes for me

Looking forward 馃憤

But if @mallibone implements it, @jfversluis can't be mean to him on the Null Pointers podcast any more. That's my favourite bit of the show.

But if @mallibone implements it, @jfversluis can't be mean to him on the Null Pointers podcast any more. That's my favourite bit of the show.

I know, right?! Now I have to do a poll to find out what else I can hold against him...

Was this page helpful?
0 / 5 - 0 ratings