-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New user experience - method naming #162
Comments
Thank you for your feedback. Here is the reply to your feedback. |
For the naming of $year = 2000; $month = 4; $day = 19;
$hour = 20; $minute = 30; $second = 15; $tz = 'Europe/Madrid';
echo Carbon::createFromDate($year, $month, $day, $tz)."\n";
echo Carbon::createMidnightDate($year, $month, $day, $tz)."\n";
echo Carbon::createFromTime($hour, $minute, $second, $tz)."\n";
echo Carbon::createFromTimeString("$hour:$minute:$second", $tz)."\n";
echo Carbon::create($year, $month, $day, $hour, $minute, $second, $tz)."\n"; $date=date_create_from_format("j-M-Y","25-Sep-2016"); COMVariant theDay;
theDay = COMVariant::createFromDate(today());
info(theDay.toString()); In addition, in terms of English grammar, |
In addition, |
I did not mean to imply that the naming is wrong or not consistent with the carbon ancestry. What I was trying to say is that it feels alien for me as a somewhat experienced Go developer. Your milage may vary of course.
All
I meant to suggest
It would take away the "stuttering" which is a comment that regularly appears in Go repo's issue discussion. All that said, no need to change anything. I was just sharing my experience, happy to have this issue closed if you want. |
Thanks for sharing your experience, the naming of method is really a headache, maybe GPT-AI can solve this problem in the future. |
If possible, help me review whether the German translation resources de.json are correct. |
LGTM. Depending on context
|
Thank you very much, can you create a pr for de.json? |
|
Thank you very much for this library! I came here from https://github.com/jinzhu/now and found many functions I was missing.
I'd like to share what made the start difficult for me- naming. The naming convention could imho be more consistent and go-ish. Please allow me to make three breaking suggestions which would imho increase consistency and usability:
carbon.Time2Carbon
stutters-carbon.FromTime
seems to be the natural namec.ToTime
instead of the oddc.Carbon2Time
(why repeat theCarbon
when you already have a carbon instance or us2
when other functions useTo
?)carbon.CreateXxx
could becomecarbon.Xxx
wich is a little less verboseThe text was updated successfully, but these errors were encountered: