Created
July 16, 2009 16:33
-
-
Save gardejo/148524 to your computer and use it in GitHub Desktop.
HTML::Shakan::Renderer::HTML::DateTimeSeparatable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package HTML::Shakan::Renderer::HTML::DateTimeSeparatable; | |
use Any::Moose '::Role'; | |
sub separate_datetime { | |
my ($self, $html) = @_; | |
$html =~ s{ | |
(</select>)([\n\s]*<select \s name="[^"]+_(?:month|day)">) | |
}{$1/$2}xmsg; | |
$html =~ s{ | |
(</select>)([\n\s]*<select \s name="[^"]+_(?:time|minute)">) | |
}{$1:$2}xmsg; | |
return $html; | |
} | |
no Any::Moose '::Role'; | |
1; | |
__END__ | |
=head1 DESCRIPTION | |
blah blah blah | |
=head1 SEE ALSO | |
=over 4 | |
=item HTML::Shakan::Renderer::HTML::DefinitionList | |
http://gist.github.com/148522 | |
=item HTML::Shakan::Renderer::HTML::SelectivelyEncodable | |
http://gist.github.com/148523 | |
=item HTML::Shakan::Renderer::HTML::DateTimeSeparatable | |
http://gist.github.com/148524 | |
=back |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment