FichteFoll / InsertDate

Sublime Text Plugin that provides a configurable command and popup for inserting the current date and time (with specific format)
MIT License
124 stars 18 forks source link

Suggestion - Unix Time #2

Closed strack closed 10 years ago

strack commented 11 years ago

hi there, Love your plugin. I have modified it slightly, and thought you might like the addition.

I added the following two lines to the date_format function, just above the final return:

if format.startswith("Unix"):
    return str(time.time())

(note: you'll also need the time import, but you already knew that ;)

I find this very useful for when I need a unique, short timestamp.

Thanks for your consideration!

Strack

FichteFoll commented 11 years ago

Looks like a valid concern with little effort.

I'll implement this along with the enhancements from #1 soonish. And I should test whether this can easily be made ST3-compatible.