Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{cs,csproj,props,targets}]
indent_size = 4
indent_style = space

[*.cs]
csharp_new_line_before_open_brace = all
csharp_style_namespace_declarations = file_scoped:suggestion
dotnet_sort_system_directives_first = true

[*.{json,yml,yaml}]
indent_size = 2
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: nuget
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
61 changes: 61 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: .NET

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build-and-test:
name: Build and test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore --verbosity minimal

- name: Test
run: dotnet test --configuration Release --no-build --verbosity minimal

pack:
name: Pack NuGet package
needs: build-and-test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json

- name: Pack
run: ./scripts/nuget-pack.sh

- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages-${{ github.sha }}
path: |
artifacts/nuget/*.nupkg
artifacts/nuget/*.snupkg
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.user
*.userosscache
*.sln.docstates
.vscode/

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.3.1] - 2026-08-29

### Changed

- Consolidated the library and tests into modern SDK-style projects.
- Updated the test suite to .NET 10 and MSTest.Sdk 4.3.3.
- Replaced AppVeyor with cross-platform GitHub Actions build and test automation.
- Replaced the checked-in NuGet executable, batch script, and hand-authored nuspec with SDK-native pack and publish scripts.
- Added deterministic builds, nullable reference types, current analyzers, XML documentation, Source Link metadata, and NuGet symbol packages.
- Added documented terminal workflows for locally packing and publishing to NuGet.org with a session-only API key.
- Refreshed package metadata, documentation, and dependency update automation.

### Fixed

- Made tests involving `DateTime.UtcNow` resilient to clock-boundary timing.

## [1.3.0] - 2022-08-30

### Changed

- Removed obsolete package targets and retained the `netstandard2.0` target to eliminate vulnerable dependencies.

## [1.2.0] - 2020-10-14

### Fixed

- Corrected month and year arithmetic for leap years and variable-length months.

### Changed

- Updated NuGet license metadata to use the Apache-2.0 SPDX expression.

## [1.1.0] - 2019-12-23

### Added

- Added the `netstandard2.0` package target.

## [1.0.0] - 2016-12-28

### Added

- First stable release.
24 changes: 0 additions & 24 deletions DateMath.nuspec

This file was deleted.

37 changes: 3 additions & 34 deletions DateMath.sln
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1776B3B6-23B5-47A8-B005-7B6275BEB4D6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DateMath", "src\DateMath\DateMath.csproj", "{F8F8DCCB-A234-41BA-9678-A6AEF659AC02}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B40AEBDC-0E9D-46FD-B6FF-0049CE78ED0D}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
appveyor.yml = appveyor.yml
DateMath.nuspec = DateMath.nuspec
LICENSE.md = LICENSE.md
nuget.bat = nuget.bat
README.md = README.md
EndProjectSection
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Shared", "src\Shared\Shared.shproj", "{20D2E708-D4D3-4CD5-8CAD-3AC7AC5E951B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DateMathStandard", "src\DateMathStandard\DateMathStandard.csproj", "{F8F8DCCB-A234-41BA-9678-A6AEF659AC02}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Core", "src\Test.Unit.Core\Test.Unit.Core.csproj", "{79E67BD1-63CD-429E-94E2-4BA807610599}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Unit.Framework", "src\Test.Unit.Framework\Test.Unit.Framework.csproj", "{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DateMath.Tests", "test\DateMath.Tests\DateMath.Tests.csproj", "{79E67BD1-63CD-429E-94E2-4BA807610599}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -37,25 +20,11 @@ Global
{79E67BD1-63CD-429E-94E2-4BA807610599}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79E67BD1-63CD-429E-94E2-4BA807610599}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79E67BD1-63CD-429E-94E2-4BA807610599}.Release|Any CPU.Build.0 = Release|Any CPU
{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{20D2E708-D4D3-4CD5-8CAD-3AC7AC5E951B} = {1776B3B6-23B5-47A8-B005-7B6275BEB4D6}
{F8F8DCCB-A234-41BA-9678-A6AEF659AC02} = {1776B3B6-23B5-47A8-B005-7B6275BEB4D6}
{79E67BD1-63CD-429E-94E2-4BA807610599} = {1776B3B6-23B5-47A8-B005-7B6275BEB4D6}
{AE67BF2F-A5B9-4A28-BB9F-B21A5AF33BBA} = {1776B3B6-23B5-47A8-B005-7B6275BEB4D6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {094D2933-4AD2-4E54-A660-C3773059E908}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Shared\Shared.projitems*{20d2e708-d4d3-4cd5-8cad-3ac7ac5e951b}*SharedItemsImports = 13
src\Shared\Shared.projitems*{f8f8dccb-a234-41ba-9678-a6aef659ac02}*SharedItemsImports = 5
EndGlobalSection
EndGlobal
15 changes: 15 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<AnalysisLevel>latest-recommended</AnalysisLevel>
<Deterministic>true</Deterministic>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(CI)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
Loading
Loading