![]() |
VOOZH | about |
dotnet add package DNTPersianUtils.Core --version 6.9.0
NuGet\Install-Package DNTPersianUtils.Core -Version 6.9.0
<PackageReference Include="DNTPersianUtils.Core" Version="6.9.0" />
<PackageVersion Include="DNTPersianUtils.Core" Version="6.9.0" />Directory.Packages.props
<PackageReference Include="DNTPersianUtils.Core" />Project file
paket add DNTPersianUtils.Core --version 6.9.0
#r "nuget: DNTPersianUtils.Core, 6.9.0"
#:package DNTPersianUtils.Core@6.9.0
#addin nuget:?package=DNTPersianUtils.Core&version=6.9.0Install as a Cake Addin
#tool nuget:?package=DNTPersianUtils.Core&version=6.9.0Install as a Cake Tool
<div dir="rtl"> DNTPersianUtils.Core کتابخانهای است متشکل از متدهای الحاقی کمکی جهت کار با فرهنگ فارسی، در برنامههای مبتنی بر NET Core. و همچنین NET 4.x. برای نصب آن دستور ذیل را در کنسول پاورشل نیوگت اجرا کنید: </div>
PM> Install-Package DNTPersianUtils.Core
| نام متد/امکانات | مثال | خروجی نمونه |
|---|---|---|
| نمایش فارسی روز دریافتی | dt.ToPersianDateTextify() | سه شنبه ۲۱ دی ۱۳۹۵ |
| نمایش دوستانهی یک تاریخ و ساعت انگلیسی به شمسی | dt.ToFriendlyPersianDateTextify() | ۱۰ روز قبل، سه شنبه ۲۱ دی ۱۳۹۵، ساعت ۱۰:۲۰ |
| تبدیلگر عدد به حروف | 1234567.NumberToText(Language.Persian) | یک میلیون و دویست و سی و چهار هزار و پانصد و شصت و هفت |
| نگارش اصلاح شدهی فرهنگ فارسی | PersianCulture.Instance <br> Thread.CurrentThread.CurrentCulture = PersianCulture.Instance; | در این فرهنگ تاریخ میلادی با شمسی جایگزین شدهاست |
| تبدیل تاریخ و زمان رشتهای شمسی به میلادی | "1395/11/3 7:30".ToGregorianDateTime() | new DateTime(2017, 1, 22, 7, 30, 0) |
| تبدیل تاریخ میلادی به شمسی | dt.ToLongPersianDateString() | 21 دی 1395 |
| تبدیل تاریخ میلادی به شمسی | dt.ToLongPersianDateTimeString() | 21 دی 1395، 10:20:02 ق.ظ |
| تبدیل تاریخ میلادی به شمسی | dt.ToPersianDateTimeString("dd MMMM yyyy") | این تبدیل بر اساس فرهنگ اصلاح شدهی فارسی صورت میگیرد. مانند <br> dt.ToPersianDateTimeString("dd MMMM yyyy - HH:mm") <br> با این خروجی فرضی: «21 دی 1395 - 10:20» |
| تبدیل تاریخ میلادی به شمسی | dt.ToShortPersianDateString() | 1395/10/21 |
| تبدیل تاریخ میلادی به شمسی | dt.ToShortPersianDateTimeString() | 1395/10/21 10:20 |
| تاریخ روزهای ابتدا و انتهای سال شمسی | dt.GetPersianYearStartAndEndDates() | |
| تاریخ روزهای ابتدا و انتهای ماه شمسی | dt.GetPersianMonthStartAndEndDates() | |
| تاریخ روزهای ابتدا و انتهای هفته شمسی | dt.GetPersianWeekStartAndEndDates() | |
| تبدیل عدد انگلیسی به فارسی | 123.ToPersianNumbers() | ۱۲۳ |
| آیا عبارت مدنظر حاوی حروف فارسی است؟ | "Abc تست".ContainsFarsi() | true |
| اصلاح ي و ك عربی به فارسی | "سنجاقك آبي".ApplyCorrectYeKe() | سنجاقک آبی |
| راست به چپ کردن یک متن ساده مخلوط برای نمایش در محیطهای چپ به راست مانند فید خوانها | "سلام Abc".ApplyRle() | Abc سلام |
| محاسبه سن | DateTime.Now.AddYears(-9).GetAge() | 9 |
| آیا تاریخ و زمان مدنظر آغاز سال نوی شمسی است؟ | dt.IsStartOfNewYear() | true/false |
| مجموعه کلمات بیاثر زبان فارسی | PersianStopwords.List | مفید برای تنظیمات جستجوهای تمام متنی |
| نرمال کردن متون. پارامتر آن قابلیت ترکیب را دارد. | "'تست'".(<br>PersianNormalizers.ConvertEnglishQuotes) | «تست» |
| لیست مناطق و استانها | Iran.Provinces | Iran.Provinces لیست تو در توی استانها و شهرهای ایران |
| مناسبتهای تعطیلات رسمی ایران | Iran.Holidays | مناسبتهای تعطیلات رسمی ایران از سال 1395 تا پایان سال 1405 |
| دریافت لیست روزهای کاری یک بازه زمانی | IranHolidays.GetBusinessDays() | روزهای کاری ایران از سال 1395 تا پایان سال 1405 |
| تبدیل تاریخ میلادی به قمری | new DateTime(2018, 08, 31).ToIslamicDay() | new IslamicDay(1439, 12, 19) |
| تبدیل تاریخ شمسی به قمری | IslamicDateUtils.PersianDayToIslamicDay(1397, 6, 9) | new IslamicDay(1439, 12, 19) |
| تبدیل ايران سيستم به يونيكد | "(‘®õø¢‘“) üî¤ðþ› é÷¬".FromIranSystemToUnicode() | "صنف جیگرکی (بادوامضاء)" |
| تبدیل يونيكد به ايران سيستم | "صنف جیگرکی (بادوامضاء)".FromUnicodeToIranSystem() | "(‘®õø¢‘“) üî¤ðþ› é÷¬" |
| نام متد/امکانات | مثال | خروجی نمونه |
|---|---|---|
| تعیین اعتبار تاریخ و زمان رشتهای شمسی | "1395/12/30".IsValidPersianDateTime()<br>به همراه [ValidPersianDateTime] مخصوص MVC | true |
| بررسی اعتبار کد ملی | "0010350829".IsValidIranianNationalCode() <br>به همراه [ValidIranianNationalCode] مخصوص MVC | true |
| بررسی اعتبار کد بانکی شبا | "IR820540102680020817909002".<br>IsValidIranShebaNumber() <br>به همراه [ValidIranShebaNumber] مخصوص MVC | true |
| بررسی اعتبار کد بانکی شتاب | "6221061106498670".<br>IsValidIranShetabNumber() <br>به همراه [ValidIranShetabNumber] مخصوص MVC | true |
| بررسی اعتبار شماره موبایل | "09901464762".<br>IsValidIranianMobileNumber() <br>به همراه [ValidIranianMobileNumber] مخصوص MVC | true |
| بررسی اعتبار شماره تلفن | "37236445".<br>IsValidIranianPhoneNumber() <br>به همراه [ValidIranianPhoneNumber] مخصوص MVC | true |
| بررسی اعتبار کد پستی | "1619735744".<br>IsValidIranianPostalCode() <br>به همراه [ValidIranianPostalCode] مخصوص MVC | true |
| بررسی اعتبار اعداد تمام فارسی | "۹۹۹۹۹".<br>ContainsOnlyPersianNumbers() <br>به همراه [ShouldContainOnlyPersianNumbers] مخصوص MVC | true |
| بررسی اعتبار حروف و یا اعداد فارسی بودن تنها قسمتی از متن | "Abc تست".<br>ContainsFarsi() <br>به همراه [ShouldContainPersianLettersOrNumbers] مخصوص MVC | true |
| بررسی اعتبار حروف فارسی بودن تمام متن | "تست".<br>ContainsOnlyFarsiLetters() <br>به همراه [ShouldContainOnlyPersianLetters] مخصوص MVC | true |
| بررسی اعتبار شناسه ملی حقوقی | "14005893875".IsValidIranianNationalLegalCode() <br>به همراه [ValidIranianNationalLegalCodeAttribute] مخصوص MVC | true |
foreach (var province in Iran.Provinces)
{
foreach (var county in province.Counties)
{
foreach (var district in county.Districts)
{
foreach (var city in district.Cities)
{
}
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 netcoreapp1.0 was computed. netcoreapp1.1 netcoreapp1.1 was computed. netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 netstandard1.3 is compatible. netstandard1.4 netstandard1.4 was computed. netstandard1.5 netstandard1.5 was computed. netstandard1.6 netstandard1.6 was computed. netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net46 net46 is compatible. net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen30 tizen30 was computed. tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Universal Windows Platform | uap uap was computed. uap10.0 uap10.0 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on DNTPersianUtils.Core:
| Package | Downloads |
|---|---|
|
ATA.Bit.Helper
Make developing Bit app in ATA co. easy and fast |
|
|
DNTCommon.Web.Core
DNTCommon.Web.Core provides common scenarios' solutions for ASP.NET Core applications. |
|
|
KAM.Kourosh.SharedLibraries
SharedModels for Kourosh |
|
|
Pejbar.Utility
Package Description |
|
|
wallet.lib.common
Add HttpPut to ApiClient |
Showing the top 4 popular GitHub repositories that depend on DNTPersianUtils.Core:
| Repository | Stars |
|---|---|
|
rabbal/DNTFrameworkCore
Lightweight and Extensible Infrastructure for Building Web Applications - Web Application Framework
|
|
|
VahidN/DNTIdentity
A highly customized sample of the ASP.NET Core Identity
|
|
|
ganjoor/GanjoorService
وب سرویس و سایت گنجور
|
|
|
VahidN/DNTCommon.Web.Core
DNTCommon.Web.Core provides common scenarios' solutions for ASP.NET Core applications.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 6.9.0 | 3,342 | 2/1/2026 |
| 6.8.0 | 454 | 1/28/2026 |
| 6.7.2 | 1,681 | 12/15/2025 |
| 6.7.1 | 1,883 | 11/15/2025 |
| 6.7.0 | 9,600 | 7/12/2025 |
| 6.6.2 | 614 | 7/10/2025 |
| 6.6.1 | 9,453 | 3/27/2025 |
| 6.6.0 | 5,227 | 2/14/2025 |
| 6.5.0 | 699 | 2/11/2025 |
| 6.4.0 | 3,960 | 1/15/2025 |
| 6.3.2 | 13,584 | 11/15/2024 |
| 6.3.1 | 19,374 | 6/8/2024 |
| 6.3.0 | 3,552 | 4/29/2024 |
| 6.2.0 | 4,557 | 4/13/2024 |
| 6.1.0 | 810 | 4/9/2024 |
| 6.0.1 | 1,632 | 4/8/2024 |
| 6.0.0 | 424 | 4/7/2024 |
| 5.9.1 | 1,016 | 3/20/2024 |
| 5.9.0 | 4,156 | 1/31/2024 |
| 5.8.1 | 6,937 | 11/16/2023 |