Konvertera datum till japanska datum
Contents
[
Hide
]
I den japanska** **kalendern börjar en ny era med en ny kejsares regeringstid. Den 1 maj 2019 kom en ny kejsare till makten med vilken Heisei-eran slutade och Reiwa-eran började.
Aspose.Cells ger ett sätt att konvertera gregorianska datum till japanska datum. Under denna omvandling beaktas också förändringarna i eran. Följande kodavsnitt konverterarkäll Excel fil som innehåller gregorianska datum tillutgång PDF med japanska datum som visas i bilden nedan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Source directory | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
//Output directory | |
string outputDir = RunExamples.Get_OutputDirectory(); | |
LoadOptions options = new LoadOptions(LoadFormat.Xlsx); | |
options.CultureInfo = new CultureInfo("ja-JP"); | |
Workbook workbook = new Workbook(sourceDir + "JapaneseDates.xlsx", options); | |
workbook.Save(outputDir + "JapaneseDates.pdf", SaveFormat.Pdf); |