Convertire le date in date giapponesi
Contents
[
Hide
]
Nel calendario giapponese, una nuova era inizia con il regno di un nuovo imperatore. Il 1° maggio 2019 un nuovo imperatore è salito al potere, concludendo l’era Heisei e iniziando l’era Reiwa.
Aspose.Cells fornisce un modo per convertire le date gregoriane in date giapponesi. Durante questa conversione, vengono considerati anche i cambiamenti nell’era. Il seguente frammento di codice converte il file Excel di origine contenente le date gregoriane nel file PDF di output con le date giapponesi, come mostrato nell’immagine sottostante.
This file contains 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); |