Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Adds release date replacement (closes #103) #115

Merged
merged 3 commits into from
Oct 15, 2015

Conversation

micheleorselli
Copy link
Contributor

As mentioned in #103 it would be nice to specify a release date a la composer. The placeholder name is datetime but maybe releasedatecould be more meaningful.

As of now the output is a string like 2015-10-28 10:34:23

@micheleorselli
Copy link
Contributor Author

@kherge any feedback on this? Thanks!

@kherge
Copy link
Contributor

kherge commented Oct 5, 2015

At the moment, the configuration setting can be accepted by Box but it will not actually do anything. There is a function called getProcessedReplacements() that gathers all of the special placeholder names for actual processing. If you added it after line 828 and update the replacement test I can merge the PR.

@micheleorselli
Copy link
Contributor Author

Sure, I'll try to update the PR asap. Are you happy using datetime as placeholder name?

@kherge
Copy link
Contributor

kherge commented Oct 5, 2015

I think you mean the name of the configuration setting? I'm okay with that.

@micheleorselli
Copy link
Contributor Author

@kherge done, let me know if is ok now

@kherge
Copy link
Contributor

kherge commented Oct 10, 2015

This looks good and I'm ready to merge it, but I just had an idea.

Would it be useful to be able to specify the date format instead of hardcoding it?

@micheleorselli
Copy link
Contributor Author

Makes sense to me though the actual format is quite generic and I guess it will be fine for a lot of users.
Anyway implementing this feature should be pretty straightforward: adding another configuration key like datetime_format which accepts a PHP date format will do the job.

I can add it to this PR is you like

@kherge
Copy link
Contributor

kherge commented Oct 10, 2015

If you don't mind doing so I would really appreciate it!

@micheleorselli
Copy link
Contributor Author

@kherge done

kherge added a commit that referenced this pull request Oct 15, 2015
@kherge kherge merged commit f658916 into box-project:2.0 Oct 15, 2015
@kherge
Copy link
Contributor

kherge commented Oct 15, 2015

I forgot to mention that the JSON validation schema needs to be updated, but I took care of that.

Thanks for your help!

Version 2.6.0 is now live.

@micheleorselli
Copy link
Contributor Author

Glad to be useful, thank you for your time :-)

@micheleorselli micheleorselli deleted the datetime-placeholder branch October 16, 2015 07:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants