(self)
| 534 | # return self.date |
| 535 | |
| 536 | def date2chntext(self): |
| 537 | date = self.date |
| 538 | try: |
| 539 | year, other = date.strip().split('年', 1) |
| 540 | year = Digit(digit=year).digit2chntext() + '年' |
| 541 | except ValueError: |
| 542 | other = date |
| 543 | year = '' |
| 544 | if other: |
| 545 | try: |
| 546 | month, day = other.strip().split('月', 1) |
| 547 | month = Cardinal(cardinal=month).cardinal2chntext() + '月' |
| 548 | except ValueError: |
| 549 | day = date |
| 550 | month = '' |
| 551 | if day: |
| 552 | day = Cardinal(cardinal=day[:-1]).cardinal2chntext() + day[-1] |
| 553 | else: |
| 554 | month = '' |
| 555 | day = '' |
| 556 | chntext = year + month + day |
| 557 | self.chntext = chntext |
| 558 | return self.chntext |
| 559 | |
| 560 | |
| 561 | class Money: |
no test coverage detected