micro-editor / micro-editor/micro
Getting date from lua script seems to give me the time instead
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description
I am currently using the Nix package of Micro, and have put together a script in Lua for inserting the time and date:
https://github.com/0x0000ff/date
However when i use os.date("%x") in Lua to get a date string as per instructions here:
https://www.lua.org/pil/22.1.html
I seem to get the time in the date format. So the current date of 09/04/26 comes out as 05/04/56.
Environment
- Version:
Version: 2.0.15
Commit hash: v2.0.15
Compiled on Unknown - OS:
linux mint 22.1 - Terminal:
Konsole 23.08.05
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided Lua script with os.date("%x") in Micro 2.0.15 on Linux Mint 22.1, then compare its output with standalone Lua behavior. Trace how Micro evaluates Lua scripts and verify whether the date format is passed and returned correctly; done means the reported date output is explained and corrected or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100