-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.7
-
Component/s: None
-
None
Most of the AsXyz properties in BsonValue are simple casts that don't do any real conversion between types. But the AsDateTime and related properties actually do a type conversion because BsonDateTime and DateTime have different ranges and resolutions, as well the question of whether to convert to local or universal time.
The following changes will be made:
Deprecate AsDateTime: use ToLocalTime or ToUniversalTime instead
Deprecate AsNullableDateTime: use ToNullableLocalTime or ToNullableUniversalTime instead
Deprecate AsUniversalTime: use ToUniversalTime instead
Deprecate IsDateTime: use IsValidDateTime instead (aligns with property of the same name in BsonDateTime)