Releases: greatfriends/ThaiBahtText
Releases · greatfriends/ThaiBahtText
v1.0.103
1.0.103
1.0.0
0.9
39 commits since last released.
New in this release:
- [Breaking change] Uses UseEt.Always as default (เป็นข้อสรุปจากคำแนะนำจากราชบัณฑิตยสภา)
- [Breaking change] Change parameter name from "Mode" to "UseEt" for more clarity.
- Add portal web site publicly at http://thaibahttext.azurewebsites.net
- [Fix bug] #45 Found one overload that not use all passed parameters
Developer related:
- Uses Code Contract to analysis the code and ensure code quality
- Uses editorconfig
- Uses Pex (and already fixed founded ArgumentOutOfRange exception)
I think the API is stable enough, I still not release it as 1.0 just because
it still lacks of public API document.
0.6
- Uses Should assertion library in unit testing
- ThaiBahtText is now accept amount from -999,999,999,999,999,999.99 to 999,999,999,999,999,999.99 (almost -Trillion to +Trillion)
- New ThaiBahtTextOptions class for configuration
- UsesEt (TensOnly, Always)
- Unit หน่วยของจำนวนเงิน (Baht, Million, Billion, Trillion)
- DecimalPlaces
int
จำนวนหลักทศนิยม (ใช้ได้เมื่อ Unit ไม่ได้เป็นค่า Unit.Baht) - AppendBahtOnly
bool
(เพิ่มคำว่าถ้วนด้วยหรือไม่)
- Accept Unit of the amount other than Baht.
- Now we have 37 test methods, 19 methods more than last release (v0.5.5).
0.5.5
- Reduce DLL size by 512 bytes
- Adding Code Contracts to the code.
- Minor optimization
net-40
- Change target to .NET Framework 4.0 so the library can use with Visual Studio 2010 and later.
- Optimize code so it is faster.
- Marked MinValue and MaxValue as const.
fifty-one
Fixed: invalid Dll had packed in the last release (0.5), please use GreatFriends.ThaiBahtText.dll
in this release instead (0.5.1).
fifty-satangs
0.5 fifty-satangs
sleeping-peter
Accept plain decimal as parameter as shown in sample code.
baby-peter
How to use:
- Add Reference to GFDN.ThaiBahtText.dll
- See below sample code and apply as needed:
using GFDN.ThaiBahtText;
...
decimal price = 11.50;
decimal? total = null;
string s1 = price.ThaiBahtText(); // สิบเอ็ดบาทห้าสิบสตางค์ (ใช้ในรูปแบบ extension method)
string s2 = total.ThaiBahtText(); // ศูนย์บาทถ้วน
string s3 = ThaiBahtTextUtil.ThaiBahtText(total); // ใช้ในรูปแบบปกติ