Skip to content

Make TDateTime a record so that it can be automatically converted to the native DateTime type under Echoes#70

Open
obones wants to merge 1 commit intoremobjects:masterfrom
obones:DateTimeAsRecord
Open

Make TDateTime a record so that it can be automatically converted to the native DateTime type under Echoes#70
obones wants to merge 1 commit intoremobjects:masterfrom
obones:DateTimeAsRecord

Conversation

@obones
Copy link
Contributor

@obones obones commented Sep 10, 2020

The assemblies I'm writing are used by C# users and because TDateTime is just an alias for Double, all they can see is a Double parameter/property/value when working with my Oxygene assemblies.
This pull request changes TDateTime to be a record that implicitly converts to and from Double along with an implicit conversion to and from DateTime when compiled for Echoes.
Note that its internal Value needs to be public so that advanced usages not covered by operators is still possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant