bolorundurowb / moment.net Goto Github PK
View Code? Open in Web Editor NEWBasically as much of a dot net port of moment.js as necessary
License: MIT License
Basically as much of a dot net port of moment.js as necessary
License: MIT License
When I create a DateTime
with a specific kind, let's say Utc
, then I expect the moment transforms to persist the kind but it does not.
My specific case is actually when using StartOf
. Example
new DateTime(2020, 02, 02, DateTimeKind.Utc).StartOf(DateTimeAnchor.Month);
This does correctly strip the day, but the kind is no longer Utc
.
Fiddle: https://dotnetfiddle.net/E8tMHx
@bolorundurowb I think its time you consider i18n support, such that the language used for display of a relative time will be based on the DateTime
's CultureInfo
So for CultureInfo("en-US")
or InvarianCulture
the relative time appears as 8 years ago and for CultureInfo("fr-FR")
, it appears as il y a 8 ans (in French, as expected).
using System;
using moment.net;
Console.WriteLine(DateTime.Today.AddDays(12).FromNow()); //Output: few seconds ago
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.