magic.lambda.dates 17.2.0

dotnet add package magic.lambda.dates --version 17.2.0
NuGet\Install-Package magic.lambda.dates -Version 17.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="magic.lambda.dates" Version="17.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add magic.lambda.dates --version 17.2.0
#r "nuget: magic.lambda.dates, 17.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install magic.lambda.dates as a Cake Addin
#addin nuget:?package=magic.lambda.dates&version=17.2.0

// Install magic.lambda.dates as a Cake Tool
#tool nuget:?package=magic.lambda.dates&version=17.2.0

magic.lambda.dates - Manipulating dates from Hyperlambda

This project contains date manipulation slots for Magic. More specifically, this project contains the following slots.

  • [date.now] - Returns the now date, equivalent of DateTime.Now.
  • [date.from-unix] - Converts the specified Unix timestamp to a DateTime object.
  • [date.min] - Returns the minimum date value, equivalent of DateTime.MinValue.
  • [date.format] - Returns a string representation of some date, formatted according to the specified [format] argument.
  • [time] - Creates a time span, useful for adding and subtracting offsets to date objects. Pass in [days], [hours], [minutes], [seconds] or [milliseconds] to declare how large your offset is. All arguments are optional, but (of course) at least one argument should be passed in.

Notice - Internally in Magic, everything is UTC Universal timezone, implying if you want to render it in user's timezone, you'll have to convert it explicitly in your client/frontend. All dates and times internally in Magic, also those stored into any database, are treated as UTC timezone. All dates transmitted to the backend, is also assumed to be UTC. This is to make things simple in regards to interacting with database systems, that may or may not add support for timezone offsets. Below is an example of taking the current date and time, and adding two days and one second to it, for then to format the result as a string.

math.add
   date.now
   time
      days:2
      second:1

date.format:x:-
   format:"yyyy-MM-dd HH:mm:ss"

How to use [date.now]

This slot takes no arguments and simply returns the current date and time. Basic usage can be found below.

date.now

How to use [date.from-unix]

This slot takes a Unix date and time stamp, and returns a typed date object as its result. Below is an example.

date.from-unix:1674132584

How to use [date.min]

This slot simply returns the minimum value a date and time object can hold. Usage can be found below.

date.min

How to use [date.format]

This slot formats a date and time object as a string. Patterns are the same as patterns for C#. Below is example usage.

date.format:date:"2023-01-19T12:49:44.000Z"
   format:dd. MMMM yyyy

How to use [time]

This slots returns a time object, which is useful for doing math operations with a date and time object, allowing you to for instance subtract 5 days from the current date and time. Below is an example.

time
   days:5

This slots can be given the following arguments;

  • [days] - Number of days
  • [hours] - Number of hours
  • [minutes] - Number of minutes
  • [seconds] - Number of seconds
  • [milliseconds] - Number of milliseconds

Project website formagic.lambda.dates

The source code for this repository can be found at github.com/polterguy/magic.lambda.dates, and you can provide feedback, provide bug reports, etc at the same place.

  • Build status
  • Quality Gate Status
  • Bugs
  • Code Smells
  • Coverage
  • Duplicated Lines (%)
  • Lines of Code
  • Maintainability Rating
  • Reliability Rating
  • Security Rating
  • Technical Debt
  • Vulnerabilities

The projects is copyright Thomas Hansen 2023 - 2024, and professionally maintained by AINIRO.IO.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on magic.lambda.dates:

Package Downloads
magic.library

Helper project for Magic to wire up everything easily by simply adding one package, and invoking two simple methods. When using Magic, this is (probably) the only package you should actually add, since this package pulls in everything else you'll need automatically, and wires up everything sanely by default. To use package go to https://polterguy.github.io

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
17.2.0 267 1/22/2024
17.1.7 150 1/12/2024
17.1.6 126 1/11/2024
17.1.5 137 1/5/2024
17.0.1 180 1/1/2024
17.0.0 317 12/14/2023
16.11.5 285 11/12/2023
16.9.0 291 10/9/2023
16.7.0 476 7/11/2023
16.4.1 338 7/2/2023
16.4.0 342 6/22/2023
16.3.1 287 6/7/2023
16.3.0 295 5/28/2023
16.1.9 580 4/30/2023
15.10.11 442 4/13/2023
15.9.1 546 3/27/2023
15.9.0 433 3/24/2023
15.8.2 460 3/20/2023
15.7.0 355 3/6/2023
15.5.0 1,470 1/28/2023
15.2.0 603 1/18/2023
15.1.0 1,122 12/28/2022
14.5.7 684 12/13/2022
14.5.5 758 12/6/2022
14.5.1 619 11/23/2022
14.5.0 570 11/18/2022
14.4.5 657 10/22/2022
14.4.1 707 10/22/2022
14.4.0 611 10/17/2022
14.3.1 1,228 9/12/2022
14.3.0 618 9/10/2022
14.1.3 875 8/7/2022
14.1.2 623 8/7/2022
14.1.1 618 8/7/2022
14.0.14 658 7/26/2022
14.0.12 641 7/24/2022
14.0.11 615 7/23/2022
14.0.10 628 7/23/2022
14.0.9 615 7/23/2022
14.0.8 680 7/17/2022
14.0.5 765 7/11/2022
14.0.4 744 7/6/2022
14.0.3 674 7/2/2022
14.0.2 626 7/2/2022
14.0.0 789 6/25/2022
13.4.0 1,989 5/31/2022
13.3.4 1,373 5/9/2022
13.3.0 897 5/1/2022
13.2.0 1,123 4/21/2022
13.1.0 991 4/7/2022
13.0.0 712 4/5/2022
11.0.5 1,379 3/2/2022
11.0.4 741 2/22/2022
11.0.3 735 2/9/2022
11.0.2 750 2/6/2022
11.0.1 738 2/5/2022
10.0.21 714 1/28/2022
10.0.20 734 1/27/2022
10.0.19 726 1/23/2022
10.0.18 709 1/17/2022
10.0.15 885 12/31/2021
10.0.14 518 12/28/2021
10.0.7 1,388 12/22/2021
10.0.5 699 12/18/2021
9.9.9 1,605 11/29/2021
9.9.3 849 11/9/2021
9.9.2 584 11/4/2021
9.9.0 693 10/30/2021
9.8.9 677 10/29/2021
9.8.7 614 10/27/2021
9.8.6 600 10/27/2021
9.8.5 700 10/26/2021
9.8.0 1,297 10/20/2021
9.7.9 575 10/19/2021
9.7.5 1,414 10/14/2021
9.7.0 824 10/9/2021
9.6.6 1,164 8/14/2021
9.2.0 6,114 5/26/2021
9.1.4 1,235 4/21/2021
9.1.0 999 4/14/2021
9.0.0 885 4/5/2021
8.9.9 988 3/30/2021
8.9.3 1,502 3/19/2021
8.9.2 1,005 1/29/2021
8.9.1 987 1/24/2021
8.9.0 1,070 1/22/2021
8.6.9 2,914 11/8/2020
8.6.6 1,903 11/2/2020
8.6.0 3,884 10/28/2020
8.5.0 1,835 10/23/2020
8.4.0 5,467 10/13/2020
8.3.1 2,544 10/5/2020
8.3.0 1,222 10/3/2020
8.2.2 1,966 9/26/2020
8.2.1 1,310 9/25/2020
8.2.0 1,347 9/25/2020
8.1.17 6,567 9/13/2020
8.1.16 565 9/13/2020
8.1.15 1,821 9/12/2020
8.1.11 2,425 9/11/2020
8.1.10 1,254 9/6/2020
8.1.9 1,300 9/3/2020
8.1.8 1,261 9/2/2020
8.1.7 1,140 8/28/2020
8.1.4 1,170 8/25/2020
8.1.3 1,235 8/18/2020
8.1.2 1,178 8/16/2020
8.1.1 1,221 8/15/2020
8.1.0 526 8/15/2020
8.0.1 2,612 8/7/2020
8.0.0 1,166 8/7/2020
7.0.1 1,337 6/28/2020
7.0.0 1,206 6/28/2020