Skip to content

请教关于日期输出的两个问题? #141

Answered by bczhc
Aisaray asked this question in Q&A
Discussion options

You must be logged in to vote

可以在lua里面自己改。比如第一个,一种方法是:

local function CnDate_translator(y)
    local t, cstr, t2
    cstr = { "", "", "", "", "", "", "", "", "", "" }
    t = ""
    for i = 1, y.len(y) do
        t2 = cstr[tonumber(y.sub(y, i, i)) + 1]
        if i == 5 and t2 ~= "" then
            t2 = "年十"
        elseif i == 5 and t2 == "" then
            t2 = ""
        end
        if i == 6 and t2 ~= "" then
            t2 = t2 .. ""
        elseif i == 6 and t2 == "" then
            t2 = ""
        end
        -- if t.sub(t,t.len(t)-1)=="年" then t2=t2 .. "月" end
        if i == 7 and tonumber(y.sub(y, 7, 7)) > 1 then
            t2 = t2 .. ""
        elseif i == 7 and t2 == "" then

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@bczhc
Comment options

@Aisaray
Comment options

@bczhc
Comment options

@bczhc
Comment options

@Aisaray
Comment options

Answer selected by Aisaray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants