Re: [protobuf] Java Date object to be added in .proto file

2019-01-18 Thread Josh Humphries
There are the well-known types
,
which include google.protobuf.Timestamp:

syntax = "proto3";
import "google/protobuf/timestamp.proto";

message Product {
google.protobuf.Timestamp last_ordered_date = 1;
}


Sadly, the documentation for each type (in the link above) does not tell
you the import path to use it. All of them are in the google.protobuf
package and the files are all imported from google/protobuf/*.proto. These
files are included with protoc, so you can find their sources in your
protobuf installation and also in the repo

.



*Josh Humphries*
jh...@bluegosling.com


On Fri, Jan 18, 2019 at 12:27 PM Shilpa Vittal  wrote:

> HI,
>
> I have a Date java object that I want to add in .proto file. I use Proto3.
> Is there any exisitng proto Datatype that I can use?
> Please advise at the earliest.
>
> Ex:
>
> message Product{
>
> optional date last_ordered_date = 1;
> }
>
> where last_ordered_date='2019-01-15'
>
> Thanks,
> Shilpa
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Java Date object to be added in .proto file

2019-01-18 Thread Shilpa Vittal
HI,

I have a Date java object that I want to add in .proto file. I use Proto3. 
Is there any exisitng proto Datatype that I can use?
Please advise at the earliest.

Ex:

message Product{

optional date last_ordered_date = 1;
}

where last_ordered_date='2019-01-15'

Thanks,
Shilpa

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.