Skip to content

Commit

Permalink
chore: enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCrossLegCoder committed Mar 31, 2024
1 parent b8902cf commit c403e76
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 27 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### Install NepDate with the package manager console

```bash
NuGet\Install-Package NepDate
Install-Package NepDate
```

### Install NepDate with the .NET CLI
Expand All @@ -24,7 +24,7 @@ dotnet add package NepDate

## Features

NepDate is a `struct` based on `.NET Standard 2.0` that closely resembles the `DateOnly` `struct` in `.NET`. It stands out due to its `easy integration`, `super-fast` and `memory-efficient` conversions, and built in `powerful features` related to Nepali date functionality.
NepDate is a super-fast and memory-efficient `struct` based on `.NET Standard 2.0` that closely resembles the `DateOnly` `struct` in `.NET` with built in powerful features related to Nepali date functionality.

### Initialization

Expand Down Expand Up @@ -154,6 +154,7 @@ nepDate.FiscalYearQuarterEndDate(); // 2081/06/30
nepDate.FiscalYearQuarterStartAndEndDate(); // (2081/04/01, 2081/06/30)
// Also can achieve the same details through parameters
// Here, We take the first year as Fiscal Year. Eg: 2080 means Fy 2080/2081
NepaliDate.GetFiscalYearStartDate(2080); // 2080/04/01
NepaliDate.GetFiscalYearEndDate(2080); // 2081/03/31
NepaliDate.GetFiscalYearStartAndEndDate(2080); // (2080/04/01, 2081/03/31)
Expand All @@ -169,13 +170,13 @@ var engDates = new List<DateTime>();
var nepDatesAsString = new List<string>();

// Converts a collection of English dates to Nepali dates
var newNepDates = NepaliDate.BulkConvert.ToNepaliDate(engDates);
var newNepDates = NepaliDate.BulkConvert.ToNepaliDates(engDates);

// Converts a collection of Nepali date instances to English dates
var newEngDates = NepaliDate.BulkConvert.ToEnglishDate(newNepDates);
var newEngDates = NepaliDate.BulkConvert.ToEnglishDates(newNepDates);

// Converts a collection of Nepali dates represented as strings to English dates
var newEngDates = NepaliDate.BulkConvert.ToEnglishDate(nepDatesAsString);
var newEngDates = NepaliDate.BulkConvert.ToEnglishDates(nepDatesAsString);
```

### Additional Functions
Expand Down
2 changes: 0 additions & 2 deletions src/NepDate/Abilities/Comparable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace NepDate
{
Expand Down
2 changes: 0 additions & 2 deletions src/NepDate/Abilities/Equatable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace NepDate
{
Expand Down
1 change: 0 additions & 1 deletion src/NepDate/Abilities/Formattable.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NepDate.Core.Dictionaries;
using NepDate.Core.Enums;
using NepDate.Exceptions;
using System;
using System.Text;
Expand Down
2 changes: 0 additions & 2 deletions src/NepDate/Abilities/Operatable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace NepDate
{
Expand Down
6 changes: 3 additions & 3 deletions src/NepDate/BulkConvert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class BulkConvert
/// </summary>
/// <param name="engDates">The collection of English dates to convert.</param>
/// <returns>An IEnumerable of NepaliDate corresponding to the input English dates.</returns>
public static IEnumerable<NepaliDate> ToNepaliDate(IEnumerable<DateTime> engDates)
public static IEnumerable<NepaliDate> ToNepaliDates(IEnumerable<DateTime> engDates)
{
return engDates.Select(item => new NepaliDate(item));
}
Expand All @@ -27,7 +27,7 @@ public static IEnumerable<NepaliDate> ToNepaliDate(IEnumerable<DateTime> engDate
/// </summary>
/// <param name="nepDates">The collection of Nepali dates (as strings) to convert.</param>
/// <returns>An IEnumerable of DateTime representing the English dates corresponding to the input Nepali dates.</returns>
public static IEnumerable<DateTime> ToEnglishDate(IEnumerable<string> nepDates)
public static IEnumerable<DateTime> ToEnglishDates(IEnumerable<string> nepDates)
{
return nepDates.Select(item => Parse(item).EnglishDate);
}
Expand All @@ -38,7 +38,7 @@ public static IEnumerable<DateTime> ToEnglishDate(IEnumerable<string> nepDates)
/// </summary>
/// <param name="nepDates">The collection of Nepali dates to convert.</param>
/// <returns>An IEnumerable of DateTime representing the English dates corresponding to the input Nepali dates.</returns>
public static IEnumerable<DateTime> ToEnglishDate(IEnumerable<NepaliDate> nepDates)
public static IEnumerable<DateTime> ToEnglishDates(IEnumerable<NepaliDate> nepDates)
{
return nepDates.Select(item => item.EnglishDate);
}
Expand Down
4 changes: 1 addition & 3 deletions src/NepDate/Core/Dictionaries/Unicodes.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using NepDate.Core.Enums;
using System;
using System;
using System.Collections.Generic;
using System.Text;

namespace NepDate.Core.Dictionaries
{
Expand Down
2 changes: 1 addition & 1 deletion src/NepDate/Core/Enums/DateFormats.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace NepDate.Core.Enums
namespace NepDate
{
public enum DateFormats
{
Expand Down
2 changes: 1 addition & 1 deletion src/NepDate/Core/Enums/FiscalYearQuarters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace NepDate.Core.Enums
namespace NepDate
{
public enum FiscalYearQuarters
{
Expand Down
2 changes: 1 addition & 1 deletion src/NepDate/Core/Enums/NepaliMonths.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace NepDate.Core.Enums
namespace NepDate
{
public enum NepaliMonths
{
Expand Down
2 changes: 1 addition & 1 deletion src/NepDate/Core/Enums/Separators.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel;

namespace NepDate.Core.Enums
namespace NepDate
{
public enum Separators
{
Expand Down
3 changes: 1 addition & 2 deletions src/NepDate/FiscalYear.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NepDate.Core.Enums;
using NepDate.Exceptions;
using NepDate.Exceptions;

namespace NepDate
{
Expand Down
1 change: 0 additions & 1 deletion src/NepDate/Properties.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NepDate.Core.Dictionaries;
using NepDate.Core.Enums;
using NepDate.Extensions;
using System;

Expand Down
3 changes: 1 addition & 2 deletions tests/NepDate.Tests/NepaliDateTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NepDate.Core.Enums;
using NepDate.Exceptions;
using NepDate.Exceptions;

namespace NepDate.Tests;

Expand Down

0 comments on commit c403e76

Please sign in to comment.