| 8 | namespace winrt::FastCopy::implementation |
| 9 | { |
| 10 | winrt::Windows::Foundation::IInspectable DateTimeToStringConverter::Convert( |
| 11 | winrt::Windows::Foundation::IInspectable const& value, |
| 12 | winrt::Windows::UI::Xaml::Interop::TypeName const& targetType, |
| 13 | winrt::Windows::Foundation::IInspectable const& parameter, |
| 14 | winrt::hstring const& language) |
| 15 | { |
| 16 | auto const p = winrt::unbox_value<winrt::Windows::Foundation::DateTime>(value); |
| 17 | auto p2 = std::chrono::clock_cast<std::chrono::system_clock>(p); |
| 18 | auto result = (std::wstringstream{} << p2).str(); |
| 19 | result = result.substr(0, result.rfind(L".")); |
| 20 | return winrt::box_value(result); |
| 21 | } |
| 22 | |
| 23 | winrt::Windows::Foundation::IInspectable DateTimeToStringConverter::ConvertBack( |
| 24 | winrt::Windows::Foundation::IInspectable const& , |
nothing calls this directly
no outgoing calls
no test coverage detected