私の質問はRailsに似ています-selectタグの月の配列を返します。
しかし、私はこのような配列が必要です:
[
["September", 9],
["August", 8],
["July", 7],
["June", 6],
["May", 5],
["April", 4],
["March", 3],
["February", 2],
["January", 1],
["December", 0]
["November", -1],
["October", -2]
]
また、現在の月が10月の場合、次のようになります。
[
["October", 10]
["September", 9],
["August", 8],
["July", 7],
["June", 6],
["May", 5],
["April", 4],
["March", 3],
["February", 2],
["January", 1],
["December", 0]
["November", -1]
]