You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
438 B
15 lines
438 B
5 years ago
|
using System;
|
||
|
|
||
|
namespace Kehyeedra3
|
||
|
{
|
||
|
public static class Extensions
|
||
|
{
|
||
|
private static DateTime YeedraTime = new DateTime(2020, 2, 2, 0, 0, 0, DateTimeKind.Utc);
|
||
|
|
||
|
public static ulong ToYeedraStamp(this DateTime time)
|
||
|
=> (ulong)(time.Subtract(YeedraTime)).TotalSeconds;
|
||
|
|
||
|
public static DateTime FromYeedraStamp(this ulong time)
|
||
|
=> YeedraTime.AddSeconds(Convert.ToDouble(time));
|
||
|
}
|
||
|
}
|