Wow, I'm shocked so many people said yes. Why would you take the risk of developing feelings (you or them) only to be separated and hurt later? Don't get it. Unless you plan to keep in touch, but even then, you're not going to see them often if ever once their gone.
Don't do it. It's selfish and it'll hurt the other party more than it hurts you to leave. My ex did that to me, and only told me 1 day before he was supposed to leave (we were only together for 2 months then). He said he didn't wanna tell me earlier because I'd get angry at him, but it hurt me even more that he didn't tell me till the day before. LDRs are difficult & you may think you can make it work, but eventually the time zones & living apart from each other is going to catch up to you and break you up. I wouldn't recommend it.
So long as they know, why not? Seems kinda' simple. I mean, let them know, this is going nowhere in X months, but until then were both human, right? (I assume?) So if he's willing, and you are, fully realizing the difficulty that is in front of you, then BY ALL MEANS! Have fun! :)